harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-996) Difference in behaviour of java.util.Date(int year, int month, int date) with large negative third parameter
Date Wed, 31 Jan 2007 14:00:16 GMT

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

Alexei Zakharov commented on HARMONY-996:
-----------------------------------------

I agree with Mikhail. So I will move it to non-bug-diff. 

> 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
>            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.


Mime
View raw message