TZInfo - Ruby Timezone Library

TZInfo is a Ruby library that provides daylight savings aware transformations between times in different timezones.

TZInfo requires a source of timezone data. There are two built-in options:

  1. The separate TZInfo::Data library (the tzinfo-data gem). TZInfo::Data contains a set of Ruby modules that are generated from the IANA Time Zone Database.
  2. A zoneinfo directory. Most Unix-like systems include a zoneinfo directory containing timezone definitions. These are also generated from the IANA Time Zone Database.

By default, TZInfo::Data will be used. If TZInfo::Data is not available (i.e. if require 'tzinfo/data' fails), then TZInfo will search for a zoneinfo directory instead.

Custom data sources can also be created and used with TZInfo.


gem files are available on

Installation and Usage

Instructions for installing and using TZInfo can be found in the project readme file.

API Documentation

API Documentation is available on

Mailing Lists

There are two TZInfo mailing lists:

Source Code

Source code repositories for TZInfo and TZInfo::Data are available on GitHub:

Issue Tracker

Please report any bugs, issues and feature requests through the GitHub issue tracker.

You can find bugs reported prior to August 2013 on the RubyForge Tracker.


Information about releases can be found on GitHub:

Ruby on Rails / Active Support

Ruby on Rails (Active Support) uses TZInfo for timezone support. Rails can automatically store times in the database using UTC and convert to and from the user's timezone for display.

Phil Ross
27 September 2013