commons-issues 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 Wed, 20 Oct 2010 06:09:24 GMT

    [ https://issues.apache.org/jira/browse/LANG-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922864#action_12922864
] 

Henri Yandell commented on LANG-59:
-----------------------------------

This change should have been fixed in 2.2, though it'd be best to test on 2.4 and then let
us know if you're still having trouble in a new JIRA issue.

> [lang] DateUtils.truncate method is buggy when dealing with DST switching hours
> -------------------------------------------------------------------------------
>
>                 Key: LANG-59
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message