Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(location): use IANA standard for timezone #1678

Merged
merged 2 commits into from Dec 23, 2022

Conversation

matthewmayer
Copy link
Contributor

fix #734

I generated this using a library which already parses the official tzdb data and therefore contains all valid tz names.

npm i @vvo/tzdb

const {timeZonesNames} = require("@vvo/tzdb")
console.log(JSON.stringify(timeZonesNames, null, 2))

I also deleted the list from other locales except en since these were just duplicates of the global list (in theory
another locale might want to have its own list, e.g. en_AU could return only Australian timestamps?)

@matthewmayer matthewmayer requested a review from a team as a code owner December 21, 2022 10:03
@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Merging #1678 (54127ff) into next (75a31f6) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1678      +/-   ##
==========================================
- Coverage   99.64%   99.64%   -0.01%     
==========================================
  Files        2244     2240       -4     
  Lines      240509   240286     -223     
  Branches     1072     1072              
==========================================
- Hits       239650   239427     -223     
  Misses        838      838              
  Partials       21       21              
Impacted Files Coverage Δ
src/locales/es/location/index.ts 100.00% <ø> (ø)
src/locales/es_MX/location/index.ts 100.00% <ø> (ø)
src/locales/he/location/index.ts 100.00% <ø> (ø)
src/locales/hr/location/index.ts 100.00% <ø> (ø)
src/locales/en/location/time_zone.ts 100.00% <100.00%> (ø)

@ST-DDT ST-DDT added p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug c: locale Permutes locale definitions m: location Something is referring to the location module labels Dec 21, 2022
@ST-DDT ST-DDT requested review from a team December 21, 2022 11:44
Copy link
Member

@Shinigami92 Shinigami92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now this is okay, but in #735 we need to move it out of en into a global thingy

@Shinigami92 Shinigami92 changed the title fix(location): Use IANA standard for timezone fix(location): use IANA standard for timezone Dec 23, 2022
@Shinigami92 Shinigami92 enabled auto-merge (squash) December 23, 2022 20:12
@Shinigami92 Shinigami92 merged commit dd81fe1 into faker-js:next Dec 23, 2022
@xDivisionByZerox
Copy link
Member

For now this is okay, but in #735 we need to move it out of en into a global thingy

I was questioning if I should mark that in this PR. @matthewmayer do you want to do that as well? Otherwise I could do that, should be easy enough.

@matthewmayer
Copy link
Contributor Author

maybe locales might want to override this in future? Like en_AU could return only Australian timezones

@Shinigami92
Copy link
Member

maybe locales might want to override this in future? Like en_AU could return only Australian timezones

@matthewmayer => #735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: locale Permutes locale definitions m: location Something is referring to the location module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Use IANA standard for timezone
5 participants