Or use DateTime::TimeZone::Alias [1]

(untested code follows)
  use DateTime::TimeZone::Alias

  for my $hr in (0 .. 12) {
    DateTime::TimeZone::Alias->set("Etc/GMT+$hr", "-${hr}:00");
    DateTime::TimeZone::Alias->set("Etc/GMT-$hr", "+${hr}:00");
  }
  # And don't forget the 15 minute offsets and the 30 minute offsets
  # Also, the offsets may go bigger than 12... check to see what you
  # have defined on your system

> >     Hehe. I'm the DBA. And I've updated everything to most recent stuff, 
> >but the boss man wants "generic time zones" in our list "just in case" a 

He means the timezone database that is distributed with the perl
DateTime package, nor your (oracle/mysql/whatever) database.

                                 -ben

[1] 
http://search.cpan.org/~jhoblitt/DateTime-TimeZone-Alias-0.0501/lib/DateTime/TimeZone/Alias.pod


On Thu, Jan 25, 2007 at 04:18:02PM +0000, Zefram wrote:
> Matthew wrote:
> >     Hehe. I'm the DBA. And I've updated everything to most recent stuff, 
> >but the boss man wants "generic time zones" in our list "just in case" a 
> >customer can't find his or doesn't realize his city is listed differently.
> 
> Unlikely to ever occur.  As far as anyone knows, the Olson zoneinfo
> database contains all currently-distinct timezones.  (It explicitly aims
> to include all timezones that have been distinct at any time since 1970.)
> You might want to play with the tzselect(8) program, which guides one
> through selecting a geographical timezone from the database.
> 
> -zefram

Reply via email to