Re: Daylight savings problem

From: Svante Nicholas Arvedahl (svante_at_dataton.se)
Date: 10/24/03


Date: Fri, 24 Oct 2003 08:19:28 GMT

I have now solved the daylight savings problem.
After some more thinking I realized that the UTC time never was wrong (I
thought it was when I set the time in windows to be what my wall clock,
which was on the dst time, showed and unchecked the "daylight savings" box,
which gave me a UTC time an hour ahead of the real UTC time. But of course
it should since the wall clock was an hour ahead due to dst).
So the problem was only that Java doesn't know that daylight savings is not
used if the dst box in windows is not checked. Using JNI I was able to
retrieve the windows settings with GetTimeZoneInformation in Windows SDK
(kernel32.lib, windows.h), and change default TimeZone if the settings
didn't match. I really think this is something the VM should handle.

Svante



Relevant Pages

  • System time changes, how to cope with?
    ... Pretty soon Daylight Savings is around the corner and I need some tips ... How do Mainframe system operators deal with time changes? ... UTC time and then they do not have to shutdown the systems and wait the ...
    (bit.listserv.ibm-main)
  • Re: UTC time
    ... Subject: UTC time ... A safe bet ... is Casablanca time - no daylight savings and many apps have this option. ...
    (Debian-User)
  • Re: daylight savings time / quark express
    ... On any windows machine, Windows 98/2000/xp/2003 are adjusting the file date ... So the MAC OS is seeming to show UTC time where the windows clients are ... WIth quark 5, it appears to be using basic Windows API ...
    (microsoft.public.win2000.general)