Re: Daylight savings problem
From: Svante Nicholas Arvedahl (svante_at_dataton.se)
Date: 10/24/03
- Next message: metfan: "Re: Which is more efficient?"
- Previous message: Zhao: "Question about java.util.Set"
- In reply to: Paul Lutus: "Re: Daylight savings problem"
- Next in thread: Illya Kysil: "Re: Daylight savings problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: metfan: "Re: Which is more efficient?"
- Previous message: Zhao: "Question about java.util.Set"
- In reply to: Paul Lutus: "Re: Daylight savings problem"
- Next in thread: Illya Kysil: "Re: Daylight savings problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|