bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/29149] New: GregorianCalendar problem with daylight-savin


From: twisti at complang dot tuwien dot ac dot at
Subject: [Bug classpath/29149] New: GregorianCalendar problem with daylight-saving(?)
Date: 20 Sep 2006 15:58:29 -0000

I found this code written by a student (stripped down to a simpler testcase):

        Date[] dates = new Date[3];
        GregorianCalendar gc = new GregorianCalendar(2005, 9, 30);

        for (int i = 0; i < 3; i++) {
            dates[i] = gc.getTime();
            gc.add(gc.DAY_OF_YEAR, 1);
        }

        for (int i = 0; i < dates.length; i++)
            System.out.println(dates[i]);

When running with RI, it prints:

$ /opt/jdk1.5.0_05/bin/java test
Sun Oct 30 00:00:00 CEST 2005
Mon Oct 31 00:00:00 CET 2005
Tue Nov 01 00:00:00 CET 2005

The same output with CACAO:

$ cacao test
Sun Oct 30 00:00:00 GMT+02:00 2005
Sun Oct 30 23:00:00 GMT+01:00 2005
Mon Oct 31 23:00:00 GMT+01:00 2005


-- 
           Summary: GregorianCalendar problem with daylight-saving(?)
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: twisti at complang dot tuwien dot ac dot at


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29149





reply via email to

[Prev in Thread] Current Thread [Next in Thread]