Anyone know how to set the timzone in Date::Manip differently every
time DateTime::Format::DateManip->parse_datetime is called?

I get dizzy reading the Date::Manip code, but it look like the
timezone gets set once and sticks:



local $ENV{TZ} = 'America/Chicago';
print Date::Manip::Date_TimeZone,"\n";
my $dt = DateTime::Format::DateManip->parse_datetime('10am EST');
print "DateTime = $dt\n";
print $dt->strftime('%a, %b %e %Y %l:%M %p %Z'), "\n\n";


local $ENV{TZ} = 'America/Boise';
print Date::Manip::Date_TimeZone,"\n";
my $dt = DateTime::Format::DateManip->parse_datetime('10am EST');
print "DateTime = $dt\n";
print $dt->strftim

CST
DateTime = 2005-11-15T09:00:00
Tue, Nov 15 2005  9:00 AM CST

CST
DateTime = 2005-11-15T09:00:00
Tue, Nov 15 2005  9:00 AM CST



-- 
Bill Moseley
[EMAIL PROTECTED]

Reply via email to