System time and MySQL CURRENT_TIMESTAMP
Posted by: harry sheng
Date: March 02, 2016 10:56AM

Environment : MySQL 5.7 on Redhat6.5, Spring 4.2 + Hibernate, Java 8
Table job has a scheduled_start_time column in TIMESTAMP type.
In Java, the Job class has scheduledStartTime attribute in java.util.Date type.

If I use java.util.Calendar.getInstance().getTime() to populate the Job instance in Java and then save it to the job table; and compare it to the result of MySQL statement "select CURRENT_TIMESTAMP", the timestamp in the job record is 3 minutes in the future than the result of the SQL statement.

Just wondering if there's some parameters I have missed to set for the MySQL database.

Options: ReplyQuote


Subject
Written By
Posted
System time and MySQL CURRENT_TIMESTAMP
March 02, 2016 10:56AM


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.