analytics icon indicating copy to clipboard operation
analytics copied to clipboard

Timezone list breaks with certain IANA valid timezones

Open ukutaht opened this issue 2 years ago • 3 comments

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

  1. When creating a site through the API and setting the timezone to Europe/Berlin
  2. The dashboard works fine and reporting is done in the correct timezone
  3. 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

ukutaht avatar Sep 17 '21 10:09 ukutaht

Hi there, I'm new to open source but seems like this is a good first issue :) Can I try it out?

bradycargle avatar Oct 28 '21 17:10 bradycargle

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.

ukutaht avatar Oct 29 '21 12:10 ukutaht

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.

LBreda avatar May 10 '22 12:05 LBreda