Bug 1021161 - Perl mktime() still not Y2K38 compatible (even it should be)?
Summary: Perl mktime() still not Y2K38 compatible (even it should be)?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 18
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1000912
TreeView+ depends on / blocked
 
Reported: 2013-10-20 01:45 UTC by Robert Scheck
Modified: 2013-12-21 21:23 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-21 21:23:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robert Scheck 2013-10-20 01:45:38 UTC
Description of problem:
According to http://search.cpan.org/~jesse/perl-5.12.0/pod/perl5120delta.pod,
Perl 5.12 (and later) should be Y2K38 compatible. However POSIX::mktime() for 
2040 is still returning undef. I am wondering about "Sizeof time_t = 4" in the
build log for i686 as well, shouldn't that be 8 when using -Duse64bitint and/
or -Duselongdouble? Or am I on the wrong path?

Version-Release number of selected component (if applicable):
perl-5.16.3-244.fc18

How reproducible:
Run the following on a 32 bit system:
perl -e 'use POSIX; print mktime(0, 0, 0, 1, 0, 140, 0, 0) . "\n"'

Actual results:
Perl mktime() still not Y2K38 compatible (even it should be)?

Expected results:
2208985200 :)

Comment 1 Petr Pisar 2013-10-21 07:50:00 UTC
Isn't time_t always 32-bit on 32-bit x86 architecture? This is what you get from kernel and glibc.

The -Duse64bitint is just to define perl's internal integer type to occupy 64-bits (i.e. typedef IV long). See config.h and perl.h:

#if defined(USE_64_BIT_INT) && defined(HAS_QUAD)
#  if QUADKIND == QUAD_IS_INT64_T && defined(INT64_MAX)
#    define IV_MAX INT64_MAX
[...]
#  else
#    define IV_MAX PERL_QUAD_MAX
[...]
#  endif
#  define IV_IS_QUAD
#  define UV_IS_QUAD
#else
#  if defined(INT32_MAX) && IVSIZE == 4
#    define IV_MAX INT32_MAX
[...]
#  else
#    define IV_MAX PERL_LONG_MAX
[...]
#  endif
#endif

Comment 2 Fedora End Of Life 2013-12-21 14:41:37 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


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