9

I'm on Windows 7 and I'm a bit new to this database stuff. I tried searching on Google for how to change the timezone from my system to UTC but the documents are somewhat advanced and I'm not too sure how to change this field.

John Smith
  • 8,567
  • 13
  • 51
  • 74
  • This question is related to windows 7 configuration, not to mysql at all. – zerkms Mar 19 '11 at 02:22
  • @zerkm: Could it be possible to change the configuration only for the database (so the SQL works in UTC mode), while retaining the time zone of the system? – Paŭlo Ebermann Mar 19 '11 at 02:30

1 Answers1

19

In your my.ini file, under the [mysqld] section, add the following line:

default-time-zone = '+00:00'

Restart the server. You could also set it at runtime from the command line with

mysql> SET GLOBAL time_zone = '+00:00';

The documentation from MySql

dugas
  • 12,025
  • 3
  • 45
  • 51