Updating timezone on Google Cloud SQL automatically

I'm try to deal with the winter and summer time in a Google Cloud SQL instance. What I'm doing now is changing the flag default_time_zone in the configuration every time the time in my region changes. I need it to do it automatically. What I tried already:

1) Looking for a configuration for Time Zone Name to set "Europe/Paris" instead of "+01:00", but Google Cloud doesn't work with this (there's a request for developers of Google to do it but it's not done yet).

2) Changing with a script with "set global @@time_zone='Europe/Paris'" but it raises:

ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

because GCP doesn't allow use super user on mySQL.

Any idea how to bear with this ?

Upvotes: 1

Views: 740

Answers (1)

Maxim
Maxim

Reputation: 4431

Unfortunately, as per the documentation:

Automatic adjustment to daylight savings time is not supported; you must update the default_time_zone flag manually to account for daylight savings time.

So currently, the only approach is to wait for feedback from the Cloud SQL engineering team in the public Feature Request regarding the daylight saving time support. There's also another Feature Request open to allow changing this yourself in the MySQL time_zone table as per 2), which you might find useful to keep track of by starring it.

Upvotes: 1

Related Questions