[TZInfo-users] Ruby and timezones

Roberto C. Sánchez roberto at connexer.com
Thu Nov 6 18:17:15 EST 2008

Hi Phil,

On Thu, Nov 06, 2008 at 10:48:52PM +0000, Philip Ross wrote:
> I've attached a patch against TZInfo 0.3.11 that makes it use zoneinfo
> files instead of the built in timezone modules. By default it will try
> and locate a zoneinfo directory in /usr/share, /usr/share/lib and
> /etc. This can be overridden by the user by setting
> TZInfo::ZoneinfoTimezoneInfo.zoneinfo_dir.

> I've tested this by comparing the output for all timezones in tzdata
> v2008i against the output of zdump (see the /utils/zdumptestall.sh
> test script in SVN). Note that the patch will break a couple of the
> included unit tests that rely on data though.
OK.  Would you consider making the tests conditional by providing an
option to enable/disable them?  Or maybe have the tests check for their
presence first?

> With the patch applied you won't need to include the definitions
> directory. You will however still need the indexes directory. The
> indexes contain a list of all the timezones and a list of timezones by
> country and need to be in sync with the installed zoneinfo version.
> I'll take a look at replacing the indexes with code that scans the
> zoneinfo directory and reads /usr/share/zoneinfo/iso3166.tab,
> /usr/share/zoneinfo/zone.tab.
OK.  This is also very good, especially once you implement code that
replaces the need for shipping the indexes.

> There is also an issue regarding information available in the TZInfo
> data modules that doesn't appear to be in the zoneinfo files. TZInfo
> is able to report how much the daylight savings offset is
> independently of the offset from UTC. For zoneinfo files, I'm
> currently having to assume that the daylight savings offset is always
> 1 hour. This is usually always the case, but I'll try and find a
> better fix.
Well, we could always force the various national and local governments
to standardize on a one hour offset.  On second thought, you might get
something done quicker by code changes :-)

> Over the next few weeks I'll try and integrate the zoneinfo support
> into TZInfo properly and make a release that makes the included data
> optional.
That would be excellent.

> Please let me know if you find any issues or have any questions.
Do you intend to make two separate releases (one with zone data and one
without), or just one release and have me remove the zone data as part
of the Debian packaging process?



Roberto C. Sánchez
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://rubyforge.org/pipermail/tzinfo-users/attachments/20081106/f5bfd11a/attachment-0001.bin>

More information about the TZInfo-users mailing list