This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/15560] New: SimpleTimeZone doesn't handle on-or-before/after at ends of month


If you define a rule that goes beyond the ends of the month, getOffset will give
incorrect results.  For example,

timezone.setEndRule(Calendar.SEPTEMBER, -6, -Calendar.TUESDAY, 43200000);

refers to the tuesday on or before September 6.  In 2004, this is actually
August 31.

off = tz.getOffset(GregorianCalendar.AD, 2004, Calendar.AUGUST, 31,
Calendar.TUESDAY, 45000000);

should occur after the end rule, but will return before it.

See mauve test gnu.testlet.java.util.SimpleTimeZone.check12 for this example.

-- 
           Summary: SimpleTimeZone doesn't handle on-or-before/after at ends
                    of month
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jlquinn at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]