Skip Menu |

This queue is for tickets about the Date-Simple CPAN distribution.

Report information
The Basics
Id: 23875
Status: new
Priority: 0/
Queue: Date-Simple

Owner: Nobody in particular
Requestors: islue [...]

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

Subject: tzname is not restored properly
Download (untitled) / with headers
text/plain 916b
Threaded perl has a problem about timezone, which would cause Date::Simple behaving unproperly. Here is a patch for the problem: $ diff -r Date-Simple-3.02.orig Date-Simple-3.02 diff -r Date-Simple-3.02.orig/lib/Date/ Date-Simple-3.02/lib/Date/ 158a159 160,161c161,174 < local $ENV{TZ} = 'UTC+0'; < return POSIX::strftime ($format, _gmtime ($self)); --- Show quoted text
> my $exists_env_tz = exists $ENV{TZ}; > my $tz = $ENV{TZ} if $exists_env_tz; > > $ENV{TZ} = 'UTC+0'; > my $result = POSIX::strftime ($format, _gmtime ($self)); > > if ( $exists_env_tz ) { > $ENV{TZ} = $tz; > } else { > delete $ENV{TZ}; > } > POSIX::tzset(); > > return $result;
The patch is still not thread safe, but somehow it can resolve the problem in most cases.

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

Please report any issues with to