commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-59) [lang] DateUtils.truncate method is buggy when dealing with DST switching hours
Date Fri, 21 Jul 2006 05:48:14 GMT
    [ http://issues.apache.org/jira/browse/LANG-59?page=comments#action_12422554 ] 
            
Henri Yandell commented on LANG-59:
-----------------------------------

Now I've actually done the commit. Doh.

 svn ci -m "Adding Niall's fix for LANG-59 - an edge case in date truncation - and his enhancement
for the unit test that was there. " src/
Sending        src/java/org/apache/commons/lang/time/DateUtils.java
Sending        src/test/org/apache/commons/lang/time/DateUtilsTest.java
Transmitting file data ..
Committed revision 424192.

Should be in tonight's nightly build:

http://people.apache.org/repository/commons-lang/jars/commons-lang-20060721.jar  

> [lang] DateUtils.truncate method is buggy when dealing with DST switching hours
> -------------------------------------------------------------------------------
>
>                 Key: LANG-59
>                 URL: http://issues.apache.org/jira/browse/LANG-59
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: Operating System: Windows XP
> Platform: Other
>            Reporter: Li Zhang
>             Fix For: 2.2
>
>         Attachments: lang_issue_59.txt
>
>
> Try to truncate 2004-10-31 01:00:00 MDT by hour and you'll actually get 2004-10-
> 31 01:00:00 MST, which is one hour after the input hour.
>     // truncate 2004-10-31 01:00:00 MDT
>     Date oct31_01MDT = new Date(1099206000000L);    
>     Date result = DateUtils.truncate(oct31_01MDT, Calendar.HOUR_OF_DAY);
>     assertEquals(oct31_01MDT, result);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message