0

Is MySQL time zone conversion broken?

I want to save java timestamp to DATETIME db field.

  • DB timezone GMT
  • Client timezone PST (GMT -07:00)
  • useTimezone = true

Client time Jul 30, 09:00:00 (GMT-07:00)

In DB I got Jul 30, 02:00:00 (GMT)

Expected in GMT - Jul 30, 16:00:00 (GMT)

During debugging I found that conversion happens here

http://www.1java2c.com/Open-Source/Java-Document/Database-JDBC-Connection-Pool/mysql/com/mysql/jdbc/TimeUtil.java.htm line 899

Is that a real issue or it is my configuration fail?

aleks.n.fedorov
  • 322
  • 1
  • 2
  • 10

0 Answers0