TZInfo - Ruby Timezone Library

TZInfo is a Ruby library that uses the standard tz (Olson) database to provide daylight savings aware transformations between times in different time zones. The tz database is compiled into Ruby modules which are packaged in the release. No external zoneinfo files are required at runtime.

Installation and Usage

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

API Documentation

API Documentation is available.

Mailing Lists

There are two TZInfo mailing lists:

RubyForge

The RubyForge project page for TZInfo can be found at http://rubyforge.org/projects/tzinfo/.

Please use the Tracker to submit any bugs or feature requests. You can download releases from the File list. The source code is available through SVN.

Ruby on Rails

Articles

Plugin

Jamis Buck has released a plugin that replaces the Rails TimeZone class with one that uses TZInfo to do the conversions. To install it run:

ruby script/plugin install tzinfo_timezone

The plugin can be found in the Ruby on Rails SVN repository at http://dev.rubyonrails.org/svn/rails/plugins/tzinfo_timezone/. See the README file for more information.

Alternatives

Ruby/TZFile

Ruby/TZFile provides a similar interface to TZInfo, but requires you to have zoneinfo files available locally.

Ruby on Rails TimeZone Class

Ruby on Rails provides a simple TimeZone class. This does not have any support for daylight savings.

Phil Ross
28th August 2006