Time::ZoneInfo - Perl extension for returning a list of Time Zones...
use Time::ZoneInfo; my $zones = Time::ZoneInfo->new(); foreach my $zone ($zones->zones) { # print $zone->zone . ' - ' . $zone->offset . "\n"; print $zone . "\n"; }
An OO interface to accessing a list of timezones. This is useful if you want to provide an interface for your user to choose one of the available time zones.
This will be the final release of Time::ZoneInfo as we hope it will be replaced by code in the perl date time project - see http://datetime.perl.org/.
Currently it is fairly hard coded to work on Debian Linux, but I will take any suggesitons on other locaitons so it can automatically fall back to other file locations, and provide your own as an alternative.
You can specify the zonetab file by passing in zonetab => 'file/location'
Return an array (or array ref) to the list of regions
Return zones (optionally just for one region)
You can read $Time::ZoneInfo::ERROR for an error message at any time.
Thanks to Richard Carver <cpan.org-rnc@thecarverzone.com> for finding issues processing comments.
Scot Penrose, <scott@cpan.org>
To install Time::ZoneInfo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Time::ZoneInfo
CPAN shell
perl -MCPAN -e shell install Time::ZoneInfo
For more information on module installation, please visit the detailed CPAN module installation guide.