tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Disable class monitoring for reloading container classes
Date Fri, 08 Oct 2010 14:30:52 GMT
Hash: SHA1


On 10/8/2010 4:44 AM, Pid wrote:
> On 08/10/2010 01:19, Jane Muse wrote:
>> If I changed the system time zone not to change with daylight savings
>> time, then it would be off by an hour. I don't think our customers would
>> like that. Or am I misunderstanding your comment?
> The system timezone is almost irrelevant, you could use UTC or any other
> stable timezone setting.


> The primitive long value of time inside a Date is the same regardless of
> timezone.  It sounds like you're relying on the system time for date
> display, rather than formatting it as needed when you need to output it.

Yeah, all Date objects ought to be merged with the user's TimeZone to
display the proper locale date/time.

Unfortunately, a java.util.Date object does /not/ carry TimeZone
information with it, but is does depend upon the TimeZone in which it
was created. For example, if your system time zone is "America/New_York"
(mine), then all your date objects created during DST are essentially
set to (-4 * 60 * 1000) for the timezone offset and (-1 * 60 * 1000) for
the DST offset. If you want to convert that into a different time zone,
you have to compute the difference between the two time zones. This is
one of the reasons it's so advantageous to use UTC for storing dates as
well as your system time zone, since the calculations are much simpler
because one of the zone/DST offsets is always zero.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message