Forum Stats

  • 3,740,545 Users
  • 2,248,270 Discussions
  • 7,861,322 Comments

Discussions

date before 1970 daylight problem

user635501
user635501 Member Posts: 16

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.

Answers

This discussion has been closed.