Display correct Local Time with DST Change

Yes, good explanation, my use case is that I am displaying a list of future scheduled events across the DST change.

This point should be made clear in a frequently reference doc like: Anvil Docs | Dealing with timezones

As a Python novice I read “Aware” and assume that would include DST. Would have saved me good deal of tinkering to just know I need to take this back to the server and use pytz.

In the end my final solution displays “Local” time as the default timezone for the user. Not a dynamic time based on their browser. So it is kind of a half solution but good enough for now. I am fortunate enough to have the timezone of each user in a database because we collect in on-boarding.

If anyone know how to pull the time zone from the browser (some custom javascript?), it would be good to know.

1 Like