[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: TimeZone
From: |
Mark Wielaard |
Subject: |
RE: TimeZone |
Date: |
Tue, 07 Sep 2004 21:56:08 +0200 |
Hi,
On Tue, 2004-09-07 at 09:56, Jeroen Frijters wrote:
> Mark Wielaard wrote:
> >
> > All my platform specific code actually produces hours already
> > so I never hit the code path that converts from seconds.
>
> Some time zones use a half hour offset, how are those handled?
Then it generates the offset as seconds. But I probably didn't have a
test case that generated a large number of negative seconds offset.
See the code in native/jni/java-util/java_util_VMTimeZone.c or
vm/reference/java/util/VMTimeZone.java:
// Turn into hours if possible.
if (gmt_offset % 3600 == 0)
gmt_offset /= 3600;
As VMTimeZone.getDefaultTimeZoneId() explains:
The
* GMT offset can be in seconds, or where it is evenly divisible by
* 3600, then it can be in hours. The offset must be the time to
* add to the local time to get GMT.
Cheers,
Mark
signature.asc
Description: This is a digitally signed message part