夏令时和时区最佳实践

谁都会走 提交于 2020-08-10 22:05:41

问题:

I am hoping to make this question and the answers to it the definitive guide to dealing with daylight saving time, in particular for dealing with the actual change overs. 我希望使这个问题及其答案成为处理夏时制(尤其是处理实际变更)的权威指南。

If you have anything to add, please do 如果您要添加任何内容,请执行

Many systems are dependent on keeping accurate time, the problem is with changes to time due to daylight savings - moving the clock forward or backwards. 许多系统都依赖于保持准确的时间,问题在于夏时制导致的时间变化-向前或向后移动时钟。

For instance, one has business rules in an order taking system that depend on the time of the order - if the clock changes, the rules might not be as clear. 例如,一个在接订单系统中有取决于订单时间的业务规则-如果时钟改变,则规则可能不太清楚。 How should the time of the order be persisted? 订购时间应如何保留? There are of course an endless number of scenarios - this one is simply an illustrative one. 当然,有无数种情况-这只是一种说明。

  • How have you dealt with the daylight saving issue? 您如何处理夏令时问题?
  • What assumptions are part of your solution? 解决方案中包含哪些假设? (looking for context here) (在此处查找上下文)

As important, if not more so: 同样重要,如果不是这样的话:

  • What did you try that did not work? 您尝试了什么却不起作用?
  • Why did it not work? 为什么不起作用?

I would be interested in programming, OS, data persistence and other pertinent aspects of the issue. 我会对编程,操作系统,数据持久性以及该问题的其他相关方面感兴趣。

General answers are great, but I would also like to see details especially if they are only available on one platform. 一般的答案很好,但是我也想看看细节,特别是如果它们仅在一个平台上可用。


解决方案:

参考一: https://stackoom.com/question/AcsT/夏令时和时区最佳实践
参考二: https://oldbug.net/q/AcsT/Daylight-saving-time-and-time-zone-best-practices-closed
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!