在存储日期和时间的应用程序中如何处理多个TimeZones? [英] How does one deal with multiple TimeZones in applications that store dates and times?

查看:97
本文介绍了在存储日期和时间的应用程序中如何处理多个TimeZones?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到这是一个主观的,但我希望在这里挑选每个人的大脑如何处理多个时区?在这里有各种类似的问题,同样广泛的接受的答案。



您在你必须克服什么问题?

解决方案

您始终将日期/时间存储在一个时区(9个10是伦敦时间),并将其转换为用户的时区。这是严格的应用程序级问题,而不是数据库。


I realize this is a bit subjective, but I'm hoping to pick everyones brain here on how they deal with multiple timezones? There are a variety of similar questions here and an equally wide variety of accepted answers.

How have you delt with this in apps you've built, and what issues did you have to overcome?

解决方案

You always store date/time in one time zone(9 out of 10 it is London time) and convert it on display to the timezone of your user. This is strictly application level issue not the db.

这篇关于在存储日期和时间的应用程序中如何处理多个TimeZones?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆