You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/01/31 15:02:05 UTC

[jira] Closed: (HARMONY-996) Difference in behaviour of java.util.Date(int year, int month, int date) with large negative third parameter

     [ https://issues.apache.org/jira/browse/HARMONY-996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov closed HARMONY-996.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Alexei Zakharov

Aha, it is already there. Closed as WON'T FIX.

> Difference in behaviour of java.util.Date(int year, int month, int date) with large negative third parameter
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-996
>                 URL: https://issues.apache.org/jira/browse/HARMONY-996
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>         Environment: Windows XP Professional
>            Reporter: Anton Luht
>         Assigned To: Alexei Zakharov
>            Priority: Trivial
>
> This seem to be a bug in RI .
> The following code 
> import java.util.*;
> public class Test  {
>   public static void main (String[] args) { 
>     for(int i = -116670; i > -116681; --i ) {
>        System.out.println("i=" + i + "\t, date=" + new Date(2, 3, i));
>     }
>   } 
> }           
> Prints in RI:
> i=-116670   , date=Sun Oct 24 00:00:00 MSK 1582
> i=-116671   , date=Sat Oct 23 00:00:00 MSK 1582
> i=-116672   , date=Fri Oct 22 00:00:00 MSK 1582
> i=-116673   , date=Thu Oct 21 00:00:00 MSK 1582
> i=-116674   , date=Wed Oct 20 00:00:00 MSK 1582
> i=-116675   , date=Tue Oct 19 00:00:00 MSK 1582
> i=-116676   , date=Mon Oct 18 00:00:00 MSK 1582
> i=-116677   , date=Sun Oct 17 00:00:00 MSK 1582
> i=-116678   , date=Sat Oct 16 00:00:00 MSK 1582
> i=-116679   , date=Thu Oct 28 00:00:00 MSK 1582
> i=-116680   , date=Wed Oct 27 00:00:00 MSK 1582
> prints in Harmony:
> i=-116670   , date=Sun Oct 24 00:00:00 MSD 1582
> i=-116671   , date=Sat Oct 23 00:00:00 MSD 1582
> i=-116672   , date=Fri Oct 22 00:00:00 MSD 1582
> i=-116673   , date=Thu Oct 21 00:00:00 MSD 1582
> i=-116674   , date=Wed Oct 20 00:00:00 MSD 1582
> i=-116675   , date=Tue Oct 19 00:00:00 MSD 1582
> i=-116676   , date=Mon Oct 18 00:00:00 MSD 1582
> i=-116677   , date=Sun Oct 17 00:00:00 MSD 1582
> i=-116678   , date=Sat Oct 16 00:00:00 MSD 1582
> i=-116679   , date=Fri Oct 05 00:00:00 MSD 1582
> i=-116680   , date=Thu Oct 04 00:00:00 MSD 1582
> Harmony version  is a correct calendar switch
> and same functionality rewritten in another way works correctly in both implementations:
> import java.util.*;
> public class Test  {
>   public static void main (String[] args) { 
>     Calendar cal = new GregorianCalendar(1582, Calendar.OCTOBER, 29);
>     for(int i = 0; i < 20 ; ++i ) {
>        cal.add(Calendar.HOUR, -24);
>        System.out.println(cal.getTime());
>     }
>   } 
> }           
> Prints in RI:
> ............
> Sun Oct 17 00:00:00 MSK 1582
> Sat Oct 16 00:00:00 MSK 1582
> Fri Oct 05 00:00:00 MSK 1582
> Thu Oct 04 00:00:00 MSK 1582
> ......
> Prints in Harmony:
> .......
> Sun Oct 17 00:00:00 MSD 1582
> Sat Oct 16 00:00:00 MSD 1582
> Fri Oct 05 00:00:00 MSD 1582
> Thu Oct 04 00:00:00 MSD 1582
> .......

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.