Search code examples
javascripttimezonedst

How can I detect if a particular timezone is in DST using Javascript


I need to display the the current time in the Central Timzone, reguardless of the client's local timezone, and to do that I need to know if the Central timezone is at UTC-6 or UTC-5

What is the best way to handle daylight savings in Javascript?


Solution

  • I ended up doing this on the server and passing it to the client after checking this post: Daylight saving time and time zone best practices

    Never trust client datetime. It may very well be incorrect.