Bug 26919 - Perl has daylight savings error
Perl has daylight savings error
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chip Turner
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-10 01:19 EST by security
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-11 17:01:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description security 2001-02-10 01:19:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17 i586)


When perl reports dates it appears to have trouble with daylight savings,
it adds 4hrs to the adjusted hour instead of the standard hour.

Reproducible: Always
Steps to Reproduce:
1. perl -e 'use POSIX; print(POSIX::strftime ("%a %b %e %H:%M:%S
%Y",gmtime(1e9)),"\n")'
2.  perl -e 'use POSIX; print(POSIX::strftime ("%a %b %e %H:%M:%S %Y
%z",localtime(1e9)),"\n")'
3. date
4. date +"%s" --date='Sun Sep  9 01:46:40 GMT 2001'
	

Actual Results:  Sun Sep  9 02:46:40 2001
Sat Sep  8 21:46:40 2001 -0400
Sat Feb 10 00:21:44 EST 2001
1000000000

Expected Results:  Sun Sep  9 01:46:40 2001
Sat Sep  8 21:46:40 2001 -0400
Sat Feb 10 00:21:44 EST 2001
1000000000

Note that in step 2 it reports that we are 4hrs away from UTC but that the
actual time difference is 5 hours.

On slackware 7.0,7.1, and current-20010208 the correct answers are given.

This was tested on 3 different installations of rh6.2, and 3 different
slackware boxes. The rh6.2 machines are independently administrated.
Comment 1 security 2001-02-10 01:32:42 EST
I suppose I should mention this is with perl-5.00503-10, perl-5.00503-12, and a
second perl-5.00503-12. A manually compiled perl-5.6.0 supposedly did not have
the bug. All 3 slackware's werte using a recent slackware perl package with
5.6.0 so this may be a perl 5.00503 bug.

Note You need to log in before you can comment on or make changes to this bug.