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'





------- Additional Comments From [EMAIL PROTECTED]  2004-07-04 21:20 -------
The appears to be fixable with a minor change to the DateUtils.modify method,
replacing the val.add call with a val.set call, doing the calculation external
to the Calendar instance. For some reason, the Calendar.add method subtracts an
additional hour in the particular test scenario mentioned in the bug report, but
doesn't with other timezones I tested (such as US/Eastern). So I think the
easiest fix is to do the calculation in our code.

I have changed the DateUtils.modify method and the existing tests pass. I've
written one test to verify the fix works with the above scenario, and I plan to
write some additional tests for rounding.

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

Reply via email to