Subject: | strptime does not correctly inherit the local/ut time of object |
The strptime() method attempts to return a Time::Piece object in the same class as the object on
which the strptime() method was invoked. In v1.07 and earlier the following code returns a
localtime object:
$dummy = Time::Piece::localtime( 0 );
$local = $dummy->strptime( $date, $format );
in v1.08 and above it always returns a UT object. The problem is that between v1.07 and v1.08
the XS strptime function added additional dummy values to the return array but the strptime
perl method was not modified to take that into account. All the values returned from strptime
are passed to _mktime() and the additional islocal variable ends up in index 11 of the array and
so is ignored. There are many fixes (the easiest involving removing the elements from XS
strptime, making _mktime count the supplied values) for this bug.