简体   繁体   English

Google Cloud SQL 和时区

[英]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.因为GCP中的SQL不支持默认时区和时区转换,所以我卡住了。

how can I convert times between time zones?如何在时区之间转换时间?

let me remind you that Israel has a light saving time change.让我提醒您,以色列有一个时变化。

Now you have the ability to set the time zone in Cloud SQL.现在,您可以在 Cloud SQL 中设置时区。 See https://cloud.google.com/sql/docs/mysql-flags .请参阅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'.限制是时区需要指定为 UTC 的偏移量,例如“+10:00”。 It does not support named time zones like 'Europe/Helsinki'.它不支持像“欧洲/赫尔辛基”这样的命名时区。

THIS ANSWER IS OBSOLETE这个答案已经过时

On Google Cloud SQL you cannot currently set your own time zone.在 Google Cloud SQL 上,您目前无法设置自己的时区。 If you need to change the time zone on your instance, please get in touch with cloud-sql@google.com.如果您需要更改实例的时区,请联系 cloud-sql@google.com。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM