react-timezone-select icon indicating copy to clipboard operation
react-timezone-select copied to clipboard

Dublin timezone code displays as BST

Open lostcarpark opened this issue 3 years ago • 1 comments

Describe the bug

I'm using react-timezone-select in my project, and it displays the timezone short code for Dublin as BST:

image

However, when I format times using getLocaleString(), it shows the TimeZone for Dublin as GMT+1:

image

Note that London displays as BST and Lisbon displays as WEST.

The thing is, Irish people tend to be a little sensitive about being called "British". We also tend not to like the UK and Ireland being referred to as the "British Isles". We generally informally refer to summer time as IST for Irish Summer Time, however, this is also used for Indian Summer Time. I quite like WEST like Lisbon, but GMT+1 is probably safest.

I'm not sure if this is something controlled from within react-timezone-select, since I haven't found timezone codes withing the GitHub project, so if you can point me at somewhere else this can be fixed, that would be helpful.

Is this really a bug? I'm not certain, but I'm logging as a bug since react-timezone-select is showing a different timezone code to getLocaleString().

Reproduction

To reproduce, select a react-timezone-select and find (GMT+1:00) Dublin (BST) during summer time.

System Info

System:
    OS: Linux 5.17 Pop!_OS 22.04 LTS
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory: 1.40 GB / 15.42 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 12.22.9 - /usr/bin/node
    npm: 8.5.1 - /usr/bin/npm
  Browsers:
    Firefox: 103.0

Used Package Manager

npm

Validations

  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [X] The provided reproduction is a minimal reproducible of the bug.

lostcarpark avatar Aug 21 '22 13:08 lostcarpark

@lostcarpark thanks for reporting this. So we're grabbing the timezone shortcodes, etc. from timezone-soft (used to be spacetime-timezone).

Without making any other changes to their library, you can change the suffix displayed in the list of react-timezone-select with the labelStyle prop (original | altName | abbrev). original removes it completely.

See: image

Playground: https://ndom91.github.io/react-timezone-select/

ndom91 avatar Aug 22 '22 09:08 ndom91