-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
8, 9
-
x86_64
-
linux, os_x
FULL PRODUCT VERSION :
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.32-642.1.1.el6.x86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
When I convert string date "1990-01-01 01:00:00.000" into Date and then print it out I get different hour "1900-01-01 01:24:00.000". The behaviour is visible only on Linux (01:24), while on Windows I get hour 01:00.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following test program:
package test;
import java.text.ParseException;
import java.util.Date;
public class Test
{
public static void main(String[] args) throws ParseException
{
Date d = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").parse("1900-01-01 01:00:00.000");
System.out.println(d);
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Mon Jan 01 01:00:00 CET 1900
ACTUAL -
Mon Jan 01 01:24:00 CET 1900
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Date d = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").parse("1900-01-01 01:00:00.000");
System.out.println(d);
---------- END SOURCE ----------
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.32-642.1.1.el6.x86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
When I convert string date "1990-01-01 01:00:00.000" into Date and then print it out I get different hour "1900-01-01 01:24:00.000". The behaviour is visible only on Linux (01:24), while on Windows I get hour 01:00.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following test program:
package test;
import java.text.ParseException;
import java.util.Date;
public class Test
{
public static void main(String[] args) throws ParseException
{
Date d = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").parse("1900-01-01 01:00:00.000");
System.out.println(d);
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Mon Jan 01 01:00:00 CET 1900
ACTUAL -
Mon Jan 01 01:24:00 CET 1900
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Date d = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").parse("1900-01-01 01:00:00.000");
System.out.println(d);
---------- END SOURCE ----------
- duplicates
-
JDK-6281408 (tz) TimeZone doesn't support Local Mean Time correctly
- Closed