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

Add missing time zone definitions for Russian Federation #18489

Merged
merged 1 commit into from
Jan 13, 2015
Merged

Add missing time zone definitions for Russian Federation #18489

merged 1 commit into from
Jan 13, 2015

Conversation

Envek
Copy link
Contributor

@Envek Envek commented Jan 13, 2015

Today I've noticed that Rails' time zone mapping is missing next russian time zones completely:

  • UTC+02 Kaliningrad
  • UTC+04 Samara
  • UTC+11 Srednekolymsk

Also I noticed that currently mapping points Volgograd to Europe/Moscow but in zones.tab from current tzdata (2014j) there is explicit Europe/Volgograd timezone exists. Changed it.

And last thing: I added mapping for all russian timezones from tzdata (such that Simferopol, Novokuznetsk, and Chita), but all of them duplicates main timezones (Moscow, Novosibirsk, and Irkutsk respectively), and these entries in zones.tab looks actual. Please tell me should I include such entries in this PR or not.

For more info see file zones.tab from tzdata, rows 329 to 349 and Wikipedia article about time in Russia. Please note that there were two large time zone changes in last years in Russia.

@rafaelfranca
Copy link
Member

cc @pixeltrix

@pixeltrix
Copy link
Contributor

@Envek the mappings list is not meant to be an exhaustive list but I'm happy for the correction to Volgograd to be merged. The list is for broad worldwide audience but if you need all possible timezones I suggest rolling your own UX because present a massive drop drown isn't a great experience.

Also sync Russian Federation time zones with `zone.tab` file from tzdata version 2014j.
@Envek
Copy link
Contributor Author

Envek commented Jan 13, 2015

OK, removed entries that duplicated existing ones with same UTC offset.

But I think entries for Kaliningrad, Samara and Srednekolymsk should be added as there is currently no russian time zones with that offsets are present in mapping.

So, with this PR merged, list of russian time zones will be as follows:

(GMT+02:00) Kaliningrad (NEW)
(GMT+03:00) Moscow
(GMT+03:00) St. Petersburg
(GMT+03:00) Volgograd (CHANGED)
(GMT+04:00) Samara (NEW)
(GMT+05:00) Ekaterinburg
(GMT+06:00) Novosibirsk
(GMT+07:00) Krasnoyarsk
(GMT+08:00) Irkutsk
(GMT+09:00) Yakutsk
(GMT+10:00) Magadan
(GMT+10:00) Vladivostok
(GMT+11:00) Srednekolymsk (NEW)
(GMT+12:00) Kamchatka

For better UX I already created initializer like that: https://gist.github.com/Envek/cda8a367764dc2cacbc0

pixeltrix added a commit that referenced this pull request Jan 13, 2015
Add missing time zone definitions for Russian Federation
@pixeltrix pixeltrix merged commit 275111f into rails:master Jan 13, 2015
@pixeltrix
Copy link
Contributor

Okay, I can understand that - thanks for the PR 👍

@Envek
Copy link
Contributor Author

Envek commented Jan 13, 2015

Thanks for review! Can it be also backported to 4.2?

@pixeltrix
Copy link
Contributor

Backported to 4.2 (12a40a8) and 4.1 (b25efc0)

Envek added a commit to Envek/i18n-timezones that referenced this pull request Jan 14, 2015
Also synced comments with UTC offsets for russian timezones with present timezones.
Envek added a commit to Envek/i18n-timezones that referenced this pull request Jan 14, 2015
Also updated comments with UTC offsets for russian timezones to be in sync with present timezones (in files with such comments).
@Envek Envek deleted the ru_timezones branch February 8, 2015 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants