Forums

Changing database timezone.

Enjoying the service so far, thank you. The "Send Feedback" button is not functional today though ("could not reach server, try again in a few moments").<br> Could you advise on how to change the databases time zone? I don't have permission to edit /etc/mysql/my.cnf to set it session-wise and I guess I cannot modify the global database setting as well. Would like my databases to have Stockholm time CET == UTC+1.

Hi there,

The global timezone affects all the users of the service, so we can't change that, obviously.

From my understanding, mysql won't let you change timezones for a specific database. All you can do is set the timezone for a particular connection, with SET time_zone https://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html

So you'd have to issue that call for each one of your connections. Maybe your ORM would be able to do it for you?