Do I need this gem to be enabled if I am running my app under Linux? #13

Closed
acrolink opened this Issue Mar 16, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@acrolink

Thank you.

@philr

This comment has been minimized.

Show comment
Hide comment
@philr

philr Mar 16, 2017

Member

No, the tzinfo-data gem is not needed on Linux.

TZInfo can read the system zoneinfo time zone files included in most Linux distributions and can therefore be used without the tzinfo-data gem.

You may still prefer to use tzinfo-data on Linux if:

  1. Your application needs to precisely control the version of the IANA time zone database being used.
  2. Your application cares about the difference between time zones defined by a set of transition times and those defined as links to or aliases of other time zones. Information about links/aliases is not available in the system zoneinfo files, but is included in tzinfo-data.
  3. The accuracy of TimezonePeriod#std_offset (the amount of time the clock is advanced in periods where daylight savings time is observed) is critical to your application. This information is not available in the system zoneinfo files, so has to be estimated by observing clock changes during transitions. The tzinfo-data gem includes the precise std_offset values. Note that TimezonePeriod#utc_total_offset will always be correct with both zoneinfo files and the tzinfo-data gem.
Member

philr commented Mar 16, 2017

No, the tzinfo-data gem is not needed on Linux.

TZInfo can read the system zoneinfo time zone files included in most Linux distributions and can therefore be used without the tzinfo-data gem.

You may still prefer to use tzinfo-data on Linux if:

  1. Your application needs to precisely control the version of the IANA time zone database being used.
  2. Your application cares about the difference between time zones defined by a set of transition times and those defined as links to or aliases of other time zones. Information about links/aliases is not available in the system zoneinfo files, but is included in tzinfo-data.
  3. The accuracy of TimezonePeriod#std_offset (the amount of time the clock is advanced in periods where daylight savings time is observed) is critical to your application. This information is not available in the system zoneinfo files, so has to be estimated by observing clock changes during transitions. The tzinfo-data gem includes the precise std_offset values. Note that TimezonePeriod#utc_total_offset will always be correct with both zoneinfo files and the tzinfo-data gem.

@philr philr added the question label Mar 16, 2017

@philr philr closed this Mar 16, 2017

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