Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

date before 1970 daylight problem

user635501Sep 16 2013 — edited Oct 16 2013

Hi All,

I am facing a problem in date which is stored in database as 1943-12-16 00:00:00.0, on querying the same it appears  as 1943-12-15 23:00:00.0.

/* code starts here */

TimeZone tz = TimeZone.getTimeZone("America/Mexico_City");

TimeZone.setDefault(tz);

/*

Here quering of dateOfBirth is done from database

*/

System.out.println("Date of birth with date time is " + dateOfBirth);  // this displays as 1943-12-15 23:00:00.0.

/* code ends here */

The above problem is appearing when choosing the below dates mentioned in before 1970.

http://www.horlogeparlante.com/historique.html?city=3530597

Please help me regarding this.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2013
Added on Sep 16 2013
1 comment
1,339 views