[php-maint] Bug#842427: php7.0-common: Timezone is set incorrectly

Russell Stuart russell-debian at stuart.id.au
Sat Oct 29 02:25:09 UTC 2016


Package: php7.0-common
Version: 7.0.12-1
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear Maintainer,

README.Debian.gz says:

  "Debian PHP has been patched to use the system wide timezone database
  from the tzdata package, making sure any updates there are
  automatically used by PHP as well."

Looking at php7.0/ext/date/lib/parse_date.re it doesn't do that.  What
is does do doesn't work when Daylight saving is in effect, to wit:

  - My timezone is Australia/Brisbane.  This is accurately reflected
    in /etc/localtime and /etc/timezone.

  - Australia/Brisbane is the same timezone as Australia/Melbourne,
    but with one difference: Australia/Brisbane does not implement
    Daylight savings, whereas Australia/Melbourne does.

  - Daylight savings is currently in effect in Australia/Melbourne.

  - abbr_search() in parse_date.re checks for a matching gmtoffset,
    only.  This is the timezone offset before Daylight savings is
    applied.  This is the same for both Australia/Brisbane and
    Australia/Melbourne.  It happens to find Australia/Melbourne
    first.

  - So PHP's timezone is set to Australia/Melbourne.  Which means
    localtime is 1 hour ahead of where it should be.

If I find the time, I will submit a patch for this.  The patch will:

  - First look at /etc/timezone.  If it accurately reflects what
    /etc/localtime says, it will be used.

  - Otherwise the attempt fails, and so PHP will continue to look
    for other options.  As it stands I don't believe there are any
    so "UTC" will be the time zone.



- -- Package-specific info:
==== Additional PHP 7.0 information ====

++++ PHP @PHP_VERSION SAPI (php7.0query -S): ++++

++++ PHP 7.0 Extensions (php7.0query -M -v): ++++

++++ Configuration files: ++++
**** /etc/php/7.0/mods-available/calendar.ini ****
extension=calendar.so

**** /etc/php/7.0/mods-available/ctype.ini ****
extension=ctype.so

**** /etc/php/7.0/mods-available/exif.ini ****
extension=exif.so

**** /etc/php/7.0/mods-available/fileinfo.ini ****
extension=fileinfo.so

**** /etc/php/7.0/mods-available/ftp.ini ****
extension=ftp.so

**** /etc/php/7.0/mods-available/gettext.ini ****
extension=gettext.so

**** /etc/php/7.0/mods-available/iconv.ini ****
extension=iconv.so

**** /etc/php/7.0/mods-available/pdo.ini ****
extension=pdo.so

**** /etc/php/7.0/mods-available/phar.ini ****
extension=phar.so

**** /etc/php/7.0/mods-available/posix.ini ****
extension=posix.so

**** /etc/php/7.0/mods-available/shmop.ini ****
extension=shmop.so

**** /etc/php/7.0/mods-available/sockets.ini ****
extension=sockets.so

**** /etc/php/7.0/mods-available/sysvmsg.ini ****
extension=sysvmsg.so

**** /etc/php/7.0/mods-available/sysvsem.ini ****
extension=sysvsem.so

**** /etc/php/7.0/mods-available/sysvshm.ini ****
extension=sysvshm.so

**** /etc/php/7.0/mods-available/tokenizer.ini ****
extension=tokenizer.so


- -- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages php7.0-common depends on:
ii  libc6        2.24-5
ii  libssl1.0.2  1.0.2j-1
ii  php-common   1:45
ii  ucf          3.0036

php7.0-common recommends no packages.

php7.0-common suggests no packages.

Versions of packages php7.0-cli depends on:
ii  libc6            2.24-5
ii  libedit2         3.1-20150325-1+b1
ii  libmagic1        1:5.28-4
ii  libpcre3         2:8.39-2
ii  libssl1.0.2      1.0.2j-1
ii  libxml2          2.9.4+dfsg1-2
ii  mime-support     3.60
ii  php7.0-json      7.0.12-1
ii  php7.0-opcache   7.0.12-1
ii  php7.0-readline  7.0.12-1
ii  tzdata           2016h-1
ii  ucf              3.0036
ii  zlib1g           1:1.2.8.dfsg-2+b1

Versions of packages php7.0-cli suggests:
pn  php-pear  <none>

Versions of packages libapache2-mod-php7.0 depends on:
ii  apache2-bin [apache2-api-20120211]  2.4.23-5
ii  libc6                               2.24-5
ii  libmagic1                           1:5.28-4
ii  libpcre3                            2:8.39-2
ii  libssl1.0.2                         1.0.2j-1
ii  libxml2                             2.9.4+dfsg1-2
ii  mime-support                        3.60
ii  php7.0-cli                          7.0.12-1
ii  php7.0-json                         7.0.12-1
ii  php7.0-opcache                      7.0.12-1
ii  tzdata                              2016h-1
ii  ucf                                 3.0036
ii  zlib1g                              1:1.2.8.dfsg-2+b1

Versions of packages libapache2-mod-php7.0 recommends:
ii  apache2  2.4.23-5

Versions of packages libapache2-mod-php7.0 suggests:
pn  php-pear  <none>

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJYFAiBAAoJEKzUn4heVFJuMTgP/R4vrKiQI0rdjt8GKAGgpNNP
BTkCzErKp9hyGbui/iEm9Bj7CuVl5rca9XeWmF0Wlnh302AxhKepWF712PsWIoF0
H3sM/bh2OVHK2nsNAdDFarq/Wb1TvdLr/3L4lmyBom7zoRip6hoBD/hm/RHg9avP
rL6upmdLNO7COApKvpS6msG5/AADZaQVkj2bDsRiRXozUSuBID8UfYzhiyrwxtAI
HckzZWMOqPQCXQbupquli/lKRloiftz/8JBrM1tz7iXm4+qKZ40wiI0CW9F8VYtm
wUfk7SM4dM6KOnT3TSbDlfQgsvizhCPFhVxAS7vgXBctiofi3xSzTnCaLIkLn9ei
CEOLLvRpvU+bIsX3CrwQACJmCJZXL4suBr3yVWv4uCfG1nSO23LiZZqfxSOXqqB9
WZOvrM7BexMXMrVGvZfNA+XgPWBOi7isKT2k/JSW2aDTXS1AhgOUJxEi2QYqeuMJ
uheL8Xxw6lMFSmnDKT3D2iN2sttdGdP6ebPiW2jrg2SWUJp2dZpcHXgwjPS0Ro+q
bztFhT3lHZWbxd1zlsA/EhsaVq0xkf428k/ZWV2LjFKPpXD4R/VGm6SpDFt3GydC
tSDsyqYUVEnA8DXHFDZ+c/cRMfdxP+ABNQIiHFbyss6T27tAMbqdUnwQLNeP+mF1
UOR4h9McfdzpapzevML/
=Ttyq
-----END PGP SIGNATURE-----



More information about the pkg-php-maint mailing list