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

Maxi commented on LANG-59:
--------------------------

I can“t find 
http://people.apache.org/repository/commons-lang/jars/commons-lang-20060721.jar,
 the site doesn't exist. Anybody could said me which is the version that 
contains the fix ?? I've ran with versions 2.1, 2.2 and it still fails when I 
try to make truncated  dealing with DST switching hours.

UNTRUNCATED DATE 2010-10-10 05:16:14.0

After truncated date with :   DateUtils.truncate(scaTransaction.getFechaTrx(),
                                        Calendar.DATE);
The result is:

TRUNCATED DATE Sat Oct 09 23:00:00 CLT 2010

> [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.

Reply via email to