TZInfo 0.3.9

TZInfo is a tool that provides daylight-savings aware transformations between times in different timezones.

  Add it to your Download Basket!

 Add it to your Watch List!


Rate it!
send us
an update
MIT/X Consortium License 
2.7/5 15
Philip Ross
ROOT \ System \ System Administration
TZInfo uses the standard tz (Olson) database to provide daylight-savings aware transformations between times in different timezones. TZInfo is pure-Ruby and doesn't require any external zoneinfo files.

The tz database has been imported (using TZDataParser) and turned into a set of Ruby modules (which are packaged with this release).


To convert a time in UTC to a local time in the America/New_York timezone, you can do the following:

require 'tzinfo'

tz = TZInfo::Timezone.get('America/New_York')
local = tz.utc_to_local(Time.utc(2005,8,29,15,35,0))

Note that the Time returned will look like it is UTC ( will return "UTC"). This is because it is not currently possible to change the offset of an individual Time instance.

About Ruby:

Ruby is a dynamic, reflective, general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was initially developed and designed by Yukihiro "Matz" Matsumoto.

Ruby supports multiple programming paradigms (including functional, object oriented and imperative), and features a dynamic type system and automatic memory management; it is therefore similar in varying respects to Python, Perl, Lisp, Dylan, and CLU.

In its current, official implementation, written in C, Ruby is a single-pass interpreted language. As there is currently no specification of the Ruby language, this implementation is considered the de facto reference. As of 2008, there are a number of alternative implementations of the Ruby language, including Rubinius, JRuby, YARV, and IronRuby, each of which takes a different approach, with JRuby providing just-in-time compilation functionality.

The language was created by Yukihiro Matsumoto, who started working on Ruby on February 24, 1993, and released it to the public in 1995. "Ruby" was named as a gemstone because of a joke within Matsumoto's circle of friends alluding to the name of the Perl programming language.

As of December 2007, the latest stable version of the reference implementation is 1.8.6. Apart from the reference, several other virtual machines are being developed for Ruby. These include JRuby, a port of Ruby to the Java platform, IronRuby, an implementation for the .NET Framework produced by Microsoft, and Rubinius, an interpreter modeled after self-hosting Smalltalk virtual machines.



What's New in This Release:

Updated to tzdata version 2008c
Support loading timezone data in the latest trunk versions of Ruby 1.9.! is now private, so call it using Rational.send :new! instead.
Prevent warnings from being output when running Ruby with the -v or -w command line options.

Last updated on May 31st, 2008

#daylight saving changes #timezone information #Ruby library #Ruby #daylight saving chan #timezone #information

Add your review!