Re: timestamp and daylight saving
Thi is unrelated to MySQL end Connector/J. java.sql.Timestamp is a subclass of java.util.Date. If a java.util.Date object set to the non-existing during the transition to daylight savings time, the result will be 1+ the given hour.
Run this sample program:
package daylight;
import java.util.Date;
import java.util.TimeZone;
public class Daylight {
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("Europe/Oslo"));
Date d = new Date(2012-1900, 02, 25, 2, 30); // 2012-03-25 02:30
System.out.println(d.toString());
}
}
Subject
Written By
Posted
February 15, 2013 08:11AM
February 22, 2013 02:15AM
Re: timestamp and daylight saving
February 27, 2013 06:02AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.