MySQL time zone

Support Wissensdatenbank

Du bist hier:

Customize MySQL timezone

MySQL offers countless functions that interact with a date or time. Also the current time can be read with NOW(). Our servers use by default the timezone ‘Europe/Zurich’. But if you want to use a custom timezone it is possible to set it at the beginning of a session. Use the following commands directly after the connection is established:

[code language=”sql”] SET SESSION time_zone = ‘+1:00’; // oder SET SESSION time_zone = ‘Europe/Helsinki’;<br />SELECT @@global.time_zone, @@session.time_zone, @@system_time_zone, NOW(); [/code]

Now all commands following in this session are processed in the time zone just set.

Tags:
War dieser Artikel hilfreich?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Wie können wir diesen Artikel verbessern?
Brauchst du Hilfe?
Related Post