0

My understanding was:

  • everything is UTC internally
  • dates are displayed in @@session.time_zone timezone for current session
  • if I do INSERT with +02:00 TZ set and insert 2015-05-15 10:54 it is parsed and stored as 2015-05-15 08:54 UTC.
  • when I change to UTC TZ it should now display 2015-05-15 08:54
  • what happens instead is that it still displays 2015-05-15 10:54

What am I doing wrong? Or is this expected? I read quite some articles about datetime in MySQL but I am still not sure.

Tomáš Fejfar
  • 147
  • 1
  • 9

1 Answers1

2

That only applies to TIMESTAMP fields. DATETIME fields are left as-is.

See http://dev.mysql.com/doc/refman/5.7/en/datetime.html

Matt Johnson-Pint
  • 439
  • 1
  • 3
  • 12