Matthew wrote:
>I see all the Etc/GMT+X inside my /usr/share/zoneinfo/Etc/ so what's up?

DateTime::TimeZone doesn't look in /usr/share/zoneinfo.  It has its own
version of the zoneinfo database, in the form of Perl modules, but it
doesn't include the Etc pseudo-zones.

>Are the Etc/GMT+X the proper "generic" time zones to use if your 
>country/region isn't specified?

Sort of.  Not quite.  If your timezone isn't in the database, you should
mail the database maintainers to get it added.

If you want to use a fixed offset from GMT/UTC/UT/whatever as your
timezone, Etc/GMT+X is the hack to use in the zoneinfo database, but
DateTime::TimeZone has a better mechanism for this.  To get 5 hours
behind UT, which is what Etc/GMT+5 does, pass in the timezone name
"-05:00".  Note the change of sign: for historical reasons the signs in
the Etc/GMT+X names are the opposite of the actual offset.

-zefram

Reply via email to