analytics
analytics copied to clipboard
Timezone list breaks with certain IANA valid timezones
Past Issues Searched
- [X] I have searched open and closed issues to make sure that the bug has not yet been reported
Issue is a Bug Report
- [X] This is a bug report and not a feature request, nor asking for self-hosted support
Describe the bug
- When creating a site through the API and setting the timezone to
Europe/Berlin
- The dashboard works fine and reporting is done in the correct timezone
- But the timezone dropdown in site settings shows GMT-12 Internation Date Line West which is clearly wrong
Expected behavior
Shows the timezone as Europe/Berlin
Screenshots
No response
Environment
No response
Hi there, I'm new to open source but seems like this is a good first issue :) Can I try it out?
Yeah, sure! Places to start from are:
- https://github.com/plausible/analytics/blob/master/lib/plausible/timezones.ex -> This is the list of timezones for the dropdown
- https://github.com/plausible/analytics/blob/master/lib/plausible_web/templates/site/new.html.eex#L61
- https://github.com/plausible/analytics/blob/master/lib/plausible_web/templates/site/settings_general.html.eex#L18
Last two are places where the dropdown is rendered.
Second this. If I set Europe/Rome it sets the -12 timezone. This is not the documented behavior at all, even the "Europe/London" from the docs does not actually work.