DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=25560>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=25560

DateUtils.truncate() is off by one hour when using a date in DST switch 'zone'

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From [EMAIL PROTECTED]  2004-07-11 17:04 -------
The truncate/round logic was adding a negative value to the current hours (using
Calendar.add) to move the hours back to zero. When this is done across the
beginning of daylight saving time, it has the affect of moving to 23:00 of the
previous day, because the hour skipped when daylight saving time doesn't exist.
For example, if daylight saving time begins at 02:00, and -5 is added to 05:00,
the result is 23:00 of yesterday, because the hour between 02:00 and 03:00
doesn't exist. The fix was to do the calculation in the truncate/round code, and
use Calendar.set to set the new hour value.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to