Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 16174 invoked from network); 19 Oct 2010 16:20:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 16:20:56 -0000 Received: (qmail 12975 invoked by uid 500); 19 Oct 2010 16:20:53 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 12161 invoked by uid 500); 19 Oct 2010 16:20:52 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 12153 invoked by uid 99); 19 Oct 2010 16:20:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 16:20:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 16:20:50 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9JGKScC003230 for ; Tue, 19 Oct 2010 16:20:28 GMT Message-ID: <23112094.49131287505228653.JavaMail.jira@thor> Date: Tue, 19 Oct 2010 12:20:28 -0400 (EDT) From: "Maxi (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (LANG-59) [lang] DateUtils.truncate method is buggy when dealing with DST switching hours MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LANG-59?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1292260= 4#action_12922604 ]=20 Maxi commented on LANG-59: -------------------------- I can=C2=B4t find http://people.apache.org/repository/commons-lang/jars/com= mons-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 an= d it still fails when I try to make truncated dealing with DST switching h= ours. UNTRUNCATED DATE 2010-10-10 05:16:14.0 After truncated date with : DateUtils.truncate(scaTransaction.getFechaTrx= (), =09=09=09=09=09Calendar.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 2= 004-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 =3D new Date(1099206000000L); =20 > Date result =3D DateUtils.truncate(oct31_01MDT, Calendar.HOUR_OF_DAY)= ; > assertEquals(oct31_01MDT, result); --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.