Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id:
123557
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
joelz [...] pobox.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Test fails compiling under 5.22.1
Date: Tue, 7 Nov 2017 23:36:33 -1000
To: bug-HTTP-Date@rt.cpan.org
From: Joel Roth <joelz@pobox.com>
Building and testing HTTP-Date-6.02 cp lib/HTTP/Date.pm blib/lib/HTTP/Date.pm Manifying 1 pod document PERL_DL_NONLAZY=1 "/home/matsue/.plenv/versions/5.22.1/bin/perl5.22.1" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # Test 95 got: "1509870300" (t/date.t at line 89) # Expected: "1509873900" # t/date.t line 89 is: ok($t, $time); t/date.t .. Failed 1/136 subtests $ cat /proc/version Linux version 3.2.61-grsec-modsign (root@ksplice-build2.us.oracle.com) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Tue Aug 12 09:58:26 UTC 2014 $ perl -V Summary of my perl5 (revision 5 version 22 subversion 1) configuration: Platform: osname=linux, osvers=3.2.61-grsec-modsign, archname=x86_64-linux uname='linux driftwood 3.2.61-grsec-modsign #1 smp tue aug 12 09:58:26 utc 2014 x86_64 x86_64 x86_64 gnulinux ' config_args='-Dprefix=/home/matsue/.plenv/versions/5.22.1 -de -Dusedevel -A'eval:scriptdir=/home/matsue/.plenv/versions/5.22.1/bin'' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.8.4', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Locally applied patches: Devel::PatchPerl 1.48 Built under linux Compiled at Nov 8 2017 00:58:12 @INC: /home/matsue/.plenv/versions/5.22.1/lib/perl5/site_perl/5.22.1/x86_64-linux /home/matsue/.plenv/versions/5.22.1/lib/perl5/site_perl/5.22.1 /home/matsue/.plenv/versions/5.22.1/lib/perl5/5.22.1/x86_64-linux /home/matsue/.plenv/versions/5.22.1/lib/perl5/5.22.1 . Thank you for your attention. -- Joel Roth
On 2017-11-08 01:36:57, joelz@pobox.com wrote:
Show quoted text
> # Test 95 got: "1509870300" (t/date.t at line 89) > # Expected: "1509873900" > # t/date.t line 89 is: ok($t, $time);
That's a difference of 3600 seconds, which points the smoking gun at something to do with daylight savings time. What's the timezone of your machine? e.g. what does $ENV{TZ} contain, and what is in /etc/timezone?
Subject: Re: [rt.cpan.org #123557] Test fails compiling under 5.22.1
Date: Wed, 8 Nov 2017 09:01:36 -1000
To: Karen Etheridge via RT <bug-HTTP-Date@rt.cpan.org>
From: Joel Roth <joelz@pobox.com>
Karen Etheridge via RT wrote:
Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=123557 > > > On 2017-11-08 01:36:57, joelz@pobox.com wrote:
> > # Test 95 got: "1509870300" (t/date.t at line 89) > > # Expected: "1509873900" > > # t/date.t line 89 is: ok($t, $time);
Show quoted text
> That's a difference of 3600 seconds, which points the > smoking gun at something to do with daylight savings time. > What's the timezone of your machine? e.g. what does > $ENV{TZ} contain, and what is in /etc/timezone?
$ cat /etc/timezone America/Los_Angeles $ perl -v This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux (with 1 registered patch, see perl -V for more detail) $ perl -E 'say $ENV{TZ}' $ perl -E 'say "undef" unless $ENV{TZ}' undef Thanks for your attention. -- Joel Roth
Subject: [rt.cpan.org #123557]
Date: Wed, 21 Feb 2018 11:28:44 -0800
To: bug-HTTP-Date@rt.cpan.org
From: Philip Ludlam <p.ludlam@cv-library.co.uk>
Hi, I've been able to replicate the issue by mocking the time back to when Joel had his issue: diff --git a/t/date.t b/t/date.t index 129904d..88ffca4 100755 --- a/t/date.t +++ b/t/date.t @@ -6,6 +6,8 @@ use Test;  plan tests => 136;  use HTTP::Date; +use Test::MockTime qw/restore_time set_fixed_time/; +  # test str2time for supported dates.  Test cases with 2 digit year  # will probably break in year 2044. @@ -81,6 +83,7 @@ ok(time2str($time), 'Thu, 03 Feb 1994 00:00:00 GMT');  # test the 'ls -l' format with missing year$  # round to nearest minute 3 days ago. +set_fixed_time('2017-11-08T09:25:00');  $time = int((time - 3 * 24*60*60) /60)*60;  my ($min, $hr, $mday, $mon) = (localtime $time)[1,2,3,4];  $mon = (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec))[$mon]; I also changed my timezone to match his: $ sudo dpkg-reconfigure tzdata Current default time zone: 'America/Los_Angeles' Local time is now:      Wed Feb 21 11:11:42 PST 2018. Universal Time is now:  Wed Feb 21 19:11:42 UTC 2018.
Subject: [rt.cpan.org #123557]
Date: Wed, 21 Feb 2018 11:54:25 -0800
To: bug-HTTP-Date@rt.cpan.org
From: Philip Ludlam <p.ludlam@cv-library.co.uk>
Here's the Pull Request: https://github.com/gisle/http-date/pull/4 Done as part of PRC


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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