[php-maint] Bug#542301: php5-cli: Date function 4 digit year problem

Tomeu Capó tomeu at museu-tecnologic.org
Tue Aug 18 22:14:51 UTC 2009

Package: php5-cli
Version: 5.2.10.dfsg.1-2
Severity: grave
Justification: renders package unusable

I try use date function with four digit year format (Y) and returns 0000
and try (y) two digit format and works. Is similar to:


The problem resides in ext/date/php_date.c at line 798, in sprintf format: 
In actual file, have: 

case 'Y': length = slprintf(buffer, 32, "%s%04ld", t->y < 0 ? "-" : "", llabs(t->y)); break;

and needs:

case 'Y': length = slprintf(buffer, 32, "%s%04lld", t->y < 0 ? "-" : "", llabs(t->y)); break;

I try to repair this and recompile php5 and rebuild package but if this bug persists in actual
deb package, is a problem.

Thanks for advance...

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: sparc (sparc64)

Kernel: Linux 2.6.24-1-sparc64-smp (SMP w/1 CPU core)
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash

Versions of packages php5-cli depends on:
ii  libbz2-1.0             1.0.5-3           high-quality block-sorting file co
ii  libc6                  2.9-23            GNU C Library: Shared libraries
ii  libcomerr2             1.41.3-1          common error description library
ii  libdb4.7               4.7.25-7          Berkeley v4.7 Database Libraries [
ii  libgssapi-krb5-2       1.7dfsg~beta3-1   MIT Kerberos runtime libraries - k
ii  libk5crypto3           1.7dfsg~beta3-1   MIT Kerberos runtime libraries - C
ii  libkrb5-3              1.7dfsg~beta3-1   MIT Kerberos runtime libraries
ii  libmagic1              5.03-1            File type determination library us
ii  libncurses5            5.7+20090803-1    shared libraries for terminal hand
ii  libpcre3               7.8-2             Perl 5 Compatible Regular Expressi
ii  libssl0.9.8            0.9.8k-3          SSL shared libraries
ii  libxml2                2.7.3.dfsg-2      GNOME XML library
ii  mime-support           3.46-1            MIME files 'mime.types' & 'mailcap
ii  php5-common            5.2.10.dfsg.1-2   Common files for packages built fr
ii  tzdata                 2009k-2           time zone and daylight-saving time
ii  ucf                    3.0018            Update Configuration File: preserv
ii  zlib1g                 1: compression library - runtime

php5-cli recommends no packages.

Versions of packages php5-cli suggests:
ii  php-pear                 5.2.10.dfsg.1-2 PEAR - PHP Extension and Applicati

-- no debconf information

More information about the pkg-php-maint mailing list