Forum Discussion
Null_Null_000
Oct 31, 2023Copper Contributor
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
- AkimboGunsBrass 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.