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

'CEST' causes TZInfo::InvalidTimezoneIdentifier: Invalid identifier #53

wueb opened this issue Jul 28, 2016 · 1 comment

'CEST' causes TZInfo::InvalidTimezoneIdentifier: Invalid identifier #53

wueb opened this issue Jul 28, 2016 · 1 comment


Copy link

wueb commented Jul 28, 2016 returns 'CEST' on my system.
This leads to an error when calling TZInfo::Timezone.get(

Maybe you should add CEST to the list of timezones.

Reproduce with TZInfo::Timezone.get('CEST')
About CEST:

I am using tzinfo version 1.2.2

Copy link

philr commented Jul 28, 2016

TZInfo only supports (and will only ever support) time zone identifiers that are included in the IANA Time Zone Database. CEST is not a valid Time Zone Database identifier, so you will get a TZInfo::InvalidTimezoneIdentifier exception raised if you try and use it.

The IANA Time Zone Database doesn't use abbreviations as identifiers because they are frequently ambiguous. Abbreviations also change twice per year in time zones that observe daylight savings time in summer.

You can use the following code to return all the time zones that are currently using CEST as an abbreviation:

TZInfo::Timezone.all.find_all {|tz| tz.current_period.abbreviation == :CEST }

@philr philr added the invalid label Jul 28, 2016
@philr philr closed this as completed Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants