Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

System time and MySQL CURRENT_TIMESTAMP (1 reply)

$
0
0
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.

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>