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

undefined method `to_local' for #<TZInfo::DataTimezone: America/New_York> #84

HCLarsen opened this Issue Apr 3, 2018 · 4 comments


None yet
2 participants

HCLarsen commented Apr 3, 2018

Despite your code showing a to_local method, and your README showing how to use it, it seems impossible to call this method on a TimeZone object.


This comment has been minimized.


philr commented Apr 3, 2018

It sounds like you're probably running the latest gem release, but reading the code and README file on the master branch.

The master branch contains changes that have not yet been released. One of these changes was the addition of a to_local method to TZInfo::Timezone.

The code and README for the latest gem release can be found in git tagged as v1.2.5. The documentation for this release is available on

@philr philr added the invalid label Apr 3, 2018

@philr philr closed this Apr 3, 2018


This comment has been minimized.

HCLarsen commented Apr 4, 2018

Problem with that is that the documentation on is incomplete. It contains no listing for the TZInfo::DataTimezone class.


This comment has been minimized.


philr commented Apr 4, 2018

The issue with TZInfo::DataTimezone being omitted from the documentation has already been resolved in master. This class will be included in the documentation for the upcoming v2.0.0 release.

The TZInfo::DataTimezone class extends from TZInfo::Timezone via TZInfo::InfoTimezone. In version 1.2.5, it provides implementations for the 'abstract' identifier, period_for_utc, periods_for_local, transitions_up_to and canonical_zone methods. These methods are all defined and documented in the TZInfo::Timezone class.


This comment has been minimized.

HCLarsen commented Apr 5, 2018

Good to know. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment