Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud SQL and time zones

I'm developing an app that meant to run only in Israel. All of our tables contains times at Israeli time (Tel Aviv time).

because the SQL in GCP doesn't support default timezone and time zone convert I got stuck.

how can I convert times between time zones?

let me remind you that Israel has a light saving time change.

like image 240
Dor Shay Avatar asked Mar 16 '23 20:03

Dor Shay


1 Answers

Now you have the ability to set the time zone in Cloud SQL. See https://cloud.google.com/sql/docs/mysql-flags. The limitation is that the time zone needs to be specified as offsets to UTC, such as '+10:00'. It does not support named time zones like 'Europe/Helsinki'.

like image 181
Tony Tseng Avatar answered Mar 19 '23 11:03

Tony Tseng