Specify a time zone to use as the reference time zone

后端 未结 4 1771
鱼传尺愫
鱼传尺愫 2021-01-07 09:06

Based on the first two answers, the question was unclear as originally posted, thus I am completely rewriting it:

The following question is concerned only w

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-07 09:22

    I always store times in GMT so that the client can convert based on it's current GMT offset (the GMT offest is available in most language).

    I write C# - so I can easily convert all DateTime objects to GMT using DateTime.ToUniversalTime() as I store data in the database.

    I am not sure what language you are using or how to convert all times to GMT in postgressql, but from a logic standpoint - storing all times in GMT will allow a uniform time zone that all other time zones can easily relate to.

    Hope this helps!

    Greenwich Mean Time

提交回复
热议问题