0

TL;DR Is there a simple way to handle daylight saving timezone for historical data ?

We have a list of timezone along with thier offset to UTC which is changed for certain zones as per DST timings. All the data is stored in UTC but displayed as per the user timezone. The issue is when DST is active or reverted the historical data view also changes . This creates a discrepancy in customer reporting in terms of billing and order counts.

Is there a standard way of handling this ?

  • 1
    The standard way is via an implementation of [the IANA time zone database](https://www.iana.org/time-zones). See also [the timezone tag wiki](https://stackoverflow.com/tags/timezone/info) and [Wikipedia](https://en.wikipedia.org/wiki/Tz_database). Since your question lacks any other detail, I am voting to closing it as dup of [a "best practices" post](https://stackoverflow.com/q/2532729). Please see also [*How do I ask a good question?*](https://stackoverflow.com/help/how-to-ask) and [*How to create a Minimal, Reproducible Example*](https://stackoverflow.com/help/minimal-reproducible-example). – Matt Johnson-Pint Jan 07 '20 at 17:37
  • 1
    Welcome to Stack Overflow. I’m afraid that we need a lot more context. Can you give a concrete example of something that goes wrong, with time zone, date and time? And the code where it goes wrong? And your programming language? – Ole V.V. Jan 08 '20 at 05:29
  • Does this answer your question? [Daylight saving time and time zone best practices](https://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices) – Ole V.V. Jan 08 '20 at 05:30

0 Answers0