Forum Discussion

Null_Null_000's avatar
Null_Null_000
Copper Contributor
Oct 31, 2023

I am using C# ExchangeService to reply message TimeZone, not the correct Original mail time.

 

new ExchangeService(ExchangeVersion.Exchange2013_SP1, TimeZoneInfo.Local)

 

Is this a problem with the server timezone?
have setting method can set the server timezone?

1 Reply

  • AkimboGuns's avatar
    AkimboGuns
    Brass Contributor

    Set DateTimeKind.Utc and specify the time zone in C# code:

    message.DateTimeSent = DateTime.SpecifyKind(originalTime, DateTimeKind.Utc);
    You can also use the ExchangeService.TimeZone property to enforce the time zone.

Resources