Jason Bodnar wrote:
I'm using DateTime and DateTime::Format::Strptime to convert some third-party
data into MySQL-compatible formats and changing the time zone to GMT. The data
had PDT as the time zone until this past weekend when Daylight Savings Time
ended and now has PST. DateTime complains that PST is ambiguous so I tried
replacing PST with 'US/Pacific', 'America/Los_Angeles' and 'PST8PDT' but
DateTime says it doesn't recognise [sic] any of those. So what timezone label
will DateTime accept for Pacific Standard Time?
In a string? None of them ... though I might patch it to accept the
Olson America/Los_Angeles ...
At the moment, if you know the zone of your times, you can add it to the
constructor:
my $parser = DateTime::Format::Strptime->new(
pattern => $your_pattern,
time_zone => 'America/Los_Angeles'
);
Though I expect to get a new version out today with another bug-fix
(also TZ related)
Cheers!
Rick Measham