"works on my machine" (I tried Centos + perl5.8.8, and OSX + perl5.12.1, both
with DateTime 0.66).
Perhaps you have a corrupt timezone file? At a minimum you should upgrade to
the latest version of DateTime.
perl -MData::Dumper -MDateTime -wle'my $dt = DateTime->now(time_zone =>
"America/Argentina/Salta"); $Data::Dumper::Maxdepth = 1; print Dumper($dt);'
$VAR1 = bless( {
'local_rd_secs' => 52307,
'local_rd_days' => 734191,
'rd_nanosecs' => 0,
'locale' => 'DateTime::Locale::en_US=HASH(0x1009e7aa0)',
'local_c' => 'HASH(0x1009e2b68)',
'utc_rd_secs' => 63107,
'formatter' => undef,
'tz' =>
'DateTime::TimeZone::America::Argentina::Salta=HASH(0x100a2f4d8)',
'utc_year' => 2012,
'utc_rd_days' => 734191,
'offset_modifier' => 0
}, 'DateTime' );
On Wed, Feb 23, 2011 at 05:25:03PM +0000, Oscar Pereira wrote:
> Hello all,
>
> When using Datetime* with the above mentioned timezone, the
> following error occurs:
>
> The timezone 'America/Argentina/Salta' could not be loaded, or is an
> invalid name.
>
> I thought this might be with the two forward slashes, but (for instance)
> the tz America/Indiana/Indianapolis works just fine. I'm using version
> 0.42 (Debian lenny).
>
> Thanks in advance!
>
> * The particular snippet of code I'm using is: DateTime->now(
> time_zone => "America/Argentina/Salta");
--
"What would life be if we had no courage
to attempt anything?" - Vincent Van Gogh
. . . . .
Karen Etheridge, [email protected] GCS C+++$ USL+++$ P+++$ w--- M++
http://etheridge.ca/ PS++ PE-- b++ DI++++ e++ h(-)