Problem displaying time for past dates

There’s a short note in the time documentation for here that says that it only gives the current offset because there isn’t good browser support for the entire timezone data. So to get the data about what the offset was for all points in time, you can use the Timezone-data package. This package bundles up all of the the IANA database so you can get correct timezone information for any zone at any point in time. You’ll want to use the getZone function to get the information for the user. (it also supports getting a specific timezone by name if you need that). I hope it works out for you!

3 Likes