Monday, March 12, 2018

Re: [google-cloud-sql-discuss] default_time_zone

I believe that it usually makes most sense to save timestamps as UTC/GMT values in a database, that would be "default_time_zone = +00:00" (see MySQL Server Time Zone Support). Instead let the application logic do convert from/to a user's preferred time-zone in all interfaces and work internally with UTC values (and with the database).

There are timezone libraries that will help you with this. This domain is quite messy and daylight saving rules change all the time. And with UTC you wouldn't need to tinker with the timezone offset manually.

On 12 March 2018 at 11:45, Silambarasan Sekar <testproject0825@gmail.com> wrote:
Hi Team,
We are using Cloud SQL (mysql) second generation. We want our Cloud SQL instances to have Central Timezone.
The instances were have a database flag as "default_time_zone" as '-06:00' till now, since the day light started yesterday, we have to manually change the database flag of 'default_time_zone' to -05:00. The same happened on Nov 4th of 2017. 

The question I wanted to ask is, "Do we have to manually change the default_time_zone twice a year because of the day light savings or is there a mechanism in place that I am not aware of which will take care of this automatically." Thank you!


Thanks & Regards
Venu

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f3ca251a-335c-43c6-ba8b-cf39fcd54ea4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CALdDuQ5ejeEcN7_haCO-q5%3DFW7toFXjd_aTM%2BCzgf2hr_OJJqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment