Incorrect time in emails sent from NetXMS
-
Hi,
A strange thing we've been having for quite a while is that mails generated by NetXMS show the wrong timestamp:
For example, an event that occurs at 8:46, will show as if it was sent at 9:46 (but will arrive at 8:46).I'm in CET (UTC+1), but during the summer, we have CEST. (UTC+2) I did some research as to what was causing this strange issue, and found the following in the header of the e-mail:
Received: ... Wed, 1 Aug 2012 08:46:02 +0200
Date: Wed, 1 Aug 2012 08:46:02 +0100
We have v1.2.0 running on a 32bit Windows 2003 server, time zone is set to GMT+1 with DST enabled.I traced this back to server/core/email.cpp, line 273 to 277. The neccessary time zone information is collected via GetTimeZoneInformation, but daylight savings does not seem to be taken into account. As far as I understand, the return value of GetTimeZoneInformation can be used to determine if standardBias or DaylightBias should be taken into account (http://msdn.microsoft.com/en-us/library/windows/desktop/ms724421(v=vs.85).aspx )
-
Hi!
Yes, you are right. When I read GetTimeZoneInformation description, I had thought that Bias field contains current bias, calculated accordingly to DST. I have fixed it already, next build will contain correct code. Thank you for digging it out!
Best regards,
Victor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login