Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 85741 invoked from network); 15 Mar 2007 01:19:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Mar 2007 01:19:39 -0000 Received: (qmail 58743 invoked by uid 500); 15 Mar 2007 01:19:40 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 58712 invoked by uid 500); 15 Mar 2007 01:19:40 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 58672 invoked by uid 99); 15 Mar 2007 01:19:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 18:19:40 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 18:19:30 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E0145714080 for ; Wed, 14 Mar 2007 18:19:09 -0700 (PDT) Message-ID: <5816376.1173921549915.JavaMail.jira@brutus> Date: Wed, 14 Mar 2007 18:19:09 -0700 (PDT) From: "Nathan Beyer (JIRA)" To: commits@harmony.apache.org Subject: [jira] Reopened: (HARMONY-2959) [classlib][luni]GregorianCalendar.get(DAY_OF_YEAR) returns incorrect value sometimes In-Reply-To: <16387162.1168408647856.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Beyer reopened HARMONY-2959: ----------------------------------- Perhaps I'm going a little crazy, but this doesn't work on Sun JREs. When I run this bit of code on Sun's JRE 5 Update 11 and JRE 6, I get a result of 345, not the expected or claimed 346. import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class CalendarTest { public static void main(String[] args) { Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000")); GregorianCalendar gc = new GregorianCalendar(); gc.setGregorianChange(date); gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000")); System.out.println(gc.get(Calendar.DAY_OF_YEAR)); } } > [classlib][luni]GregorianCalendar.get(DAY_OF_YEAR) returns incorrect value sometimes > ------------------------------------------------------------------------------------ > > Key: HARMONY-2959 > URL: https://issues.apache.org/jira/browse/HARMONY-2959 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Tony Wu > Assigned To: Tim Ellison > Attachments: harmony-2959.diff > > > Following testcase passes on RI whereas fails on Harmony. > public void test() { > Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000")); > GregorianCalendar gc = new GregorianCalendar(); > gc.setGregorianChange(date); > gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000")); > assertEquals(346, gc.get(Calendar.DAY_OF_YEAR)); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.