NotesDateTime ignoring DST timezone

Hi,

I have a LotusScript code running from a UK server that’s behaving oddly with DateTime. UK is not in DST, but the US is. At the moment, London and NY are 4 hours apart. However, the code returns a 5 hour difference (which would be correct when the US is no longer in DST next week):

timestr$ = “30/10/2007 09:17:55 AM EDT”

Set newDate = New NotesDateTime(timestr$)

But newDate’s properties contain:

LOCALTIME = “30/10/2007 14:17:55 GMT”

GMTTIME = “30/10/2007 14:17:55 GMT”

LSLOCALTIME = 30/10/2007 14:17:55

LSGMTTIME = 30/10/2007 14:17:55

TIMEZONE = 5

ISDST = False

ZONETIME = “30/10/2007 09:17:55 EST”

Notice ZONETIME actually changes the original EDT to EST. The correct UK time should be “30/10/2007 13:17:55 GMT”. The UK server is running Windows 2003 Server and is fully OS patched. Both Windows time zone settings and scheduling appointments on this server properly returns a 4 hour difference between the 2 cities. Any clue what I’m doing wrong?

Subject: NotesDateTime ignoring DST timezone

Did you perform your DST update earlier this year? If not, then the US time will already have been adjusted according to the old DST rules and perhaps this is why you are seeing the 5 hour difference before you expect to see it.

Subject: RE: NotesDateTime ignoring DST timezone

A DST update was applied. When I make an appointment between London and NY using this server, the time difference is 4 hours, not 5. I can also change the Time Zone in Windows between the 2 cities and the time changes by 4 hours.

Subject: RE: NotesDateTime ignoring DST timezone

Just to be clear - DST update was applied on the UK server in addition to the US server?

Subject: RE: NotesDateTime ignoring DST timezone

Yes, DST updates for the OS were applied to all servers. Though in this case, it doesn’t seem like the US server plays a role. The script is run on the UK server and the date that’s fed in is a string.

I’m wondering if anyone else gets the same results when running those two lines of LotusScript from an area that recently exited DST.

Subject: RE: NotesDateTime ignoring DST timezone

OK, you applied the OS patch for the DST change. How about the Lotus DST patch?

http://www-1.ibm.com/support/docview.wss?rs=463&context=SSKTMJ&dc=D600&uid=swg21254624&loc=en_US&cs=UTF-8&lang=en&rss=ct463lotus

See also:

http://www-1.ibm.com/support/docview.wss?uid=swg24014828

and:

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/8e2176ce3504c9288525729e00035027?OpenDocument

Subject: RE: NotesDateTime ignoring DST timezone

For the server, there is really just the OS and JTZU patch. That has been done (though I don’t believe that the Java update would affect the LotusScript part) several months ago. So I’m still scratching my head on this one…

BTW, I appreciate the suggestions you’ve been giving. Thanks!

Subject: RE: NotesDateTime ignoring DST timezone

Maybe you have discovered a previously unknown bug? Anyway, hope you are able to solve it - not sure if I can be of any more help…

Subject: NotesDateTime ignoring DST timezone

As a follow-up to this, now that the US has also exited DST, I’ve checked this again on another UK-based server. I create another NotesDateTime based on a fixed string. Notice how the LocalTime settings are telling me the time is 17:41:23 GDT, when the actual time there is 16:41:23 GMT.

06/11/2007 16:49:48 AMgr: Start executing agent ‘printtime’ in ‘printtime.nsf’

06/11/2007 16:49:48 Agent printing: Passed In: 11/06/2007 11:41:23 EST

06/11/2007 16:49:49 Agent printing: Expecting: 11/06/2007 16:41:23 GMT

06/11/2007 16:49:49 Agent printing: Got LocalTime: 11/06/2007 17:41:23 GDT

06/11/2007 16:49:49 Agent printing: Got GMTTime: 11/06/2007 16:41:23 GMT

06/11/2007 16:49:49 Agent printing: Got ZoneTime: 11/06/2007 11:41:23 EST

06/11/2007 16:49:49 Agent printing: Got LSLocalTime: 11/06/2007 17:41:23

06/11/2007 16:49:49 Agent printing: Got LSGMTTime: 11/06/2007 16:41:23

06/11/2007 16:49:49 AMgr: Agent ‘printtime’ in ‘printtime.nsf’ completed execution

Is this an issue with the how LotusScript is understanding the current time zone?

In a different note, using a db.Search with a NotesDateTime cutoff date across countries that use different time formats (MM/DD/YYYY vs. DD/MM/YYYY) is driving me insane. It believes November 6 (11/6/2007) is June 11 (6/11/2007), making the cut-off date parameter incorrect. :-/ If anyone has insight on this as well, let me know. Back to testing…