JDK-4247196 : java.sql.Timestamp broken in some time zones
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.1.6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-06-17
  • Updated: 1999-11-12
  • Resolved: 1999-11-12
Related Reports
Duplicate :  
Description

Name: krT82822			Date: 06/16/99


[believe this is a dupe, but can't find the correct bug # to dupe this to.  --kevin.ryan@eng, 16 June 99]

TimeZone.setDefault(TimeZone.getTimeZone("PST"));
System.out.println(
        new java.sql.Timestamp(99, 3, 4, 2, 30, 0, 0));

prints "1999-04-04 01:30:00.0"
(Review ID: 83505) 
======================================================================

Comments
WORK AROUND Name: krT82822 Date: 06/16/99 Set the default timezone to UTC when performing JDBC operations. ====================================================================== Avoid specifying non existing wall time. masayoshi.okutsu@Eng 1999-11-12
12-11-1999

EVALUATION This doesn't look like a JDBC problem. The time returned doesn't reflect the time that is set and is out by a very strange margin. jon.ellis@Eng 1999-11-11 This is a duplicate of 4284987. The current Calendar implementation interprets the given wall time (2:30am) as a standard time and get DST offset and try to adjust it. (i.e., 2:30am is interpreted 30 minutes to 3:00am PDT, which is 1:30am in wall time) masayoshi.okutsu@Eng 1999-11-12
12-11-1999