Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the DateManip CPAN distribution.

Report information
The Basics
Id: 15423
Status: resolved
Priority: 0/
Queue: DateManip

People
Owner: Nobody in particular
Requestors: cpan [...] wingenbach.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 5.44
Fixed in: (no value)



Subject: Determine Correct Time zone
Download (untitled) / with headers
text/plain 634b
I am trying to use Date::Manip to display the correct time according to the TZ specified for any time() since epoch. Here's the test code: use Date::Manip; $ENV{TZ}='EST05EDT'; my $tz = Date_TimeZone; print "TZ: $tz\n"; my $date = ParseDate("today"); my $pdate = UnixDate($date, "%m/%d/%Y %H:%M:%S %Z"); print "Today: $pdate\n"; $date = time() - 86400*2; $date = ParseDateString ("epoch $date"); $pdate = UnixDate($date, "%m/%d/%Y %H:%M:%S %Z"); print "Two days ago: $pdate\n"; Note that 2 days ago it was EDT.. Hoewever the test run results in: TZ: EST Today: 10/31/2005 10:58:42 EST Two days ago: 10/29/2005 10:58:42 EST
Fixed in 6.xx


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.