php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73225 'GMT-14' formatted as '+14' in 7.1.0RC3 only
Submitted: 2016-10-02 10:23 UTC Modified: 2016-10-06 16:07 UTC
From: sjon at hortensius dot net Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 7.1.0RC3 OS:
Private report: No CVE-ID: None
 [2016-10-02 10:23 UTC] sjon at hortensius dot net
Description:
------------
I found 7.1.0RC3 unexpectedly formats "Etc/GMT-14" as '+14', this goes against the warning displayed on http://php.net/manual/en/timezones.others.php

See https://3v4l.org/3FOZp

Test script:
---------------
<?php
$time = new DateTime("2001-05-12 00:20:00", new DateTimeZone("Etc/GMT-14"));
echo $time->format("D, d M Y H:i:s T");

Expected result:
----------------
Sat, 12 May 2001 00:20:00 GMT-14

Actual result:
--------------
Sat, 12 May 2001 00:20:00 +14

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-03 11:29 UTC] bwoebi@php.net
-Type: Bug +Type: Documentation Problem
 [2016-10-03 11:29 UTC] bwoebi@php.net
As per a change in the official timezone database version 2016g (http://mm.icann.org/pipermail/tz-announce/2016-September/000041.html) this is expected behavior. See the linked announcement mail for a list of all changes.

Changing to documentation bug as docs need to be updated in order to reflect that change.
 [2016-10-04 16:00 UTC] cmb@php.net
I'm not sure that we should document *this* change. Actually, the
first warning on the page already states:

> Please do not use any of the timezones listed here (besides
> UTC), they only exist for backward compatible reasons, and may
> expose erroneous behavior.
 [2016-10-04 16:04 UTC] sjon at hortensius dot net
@cmb; You might be right, I just found it odd and expected a notice in the changelog. But maybe the current warning calling it erroneous is indeed enough
 [2016-10-06 16:07 UTC] derick@php.net
-Status: Open +Status: Not a bug
 [2016-10-06 16:07 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

I'm closing this, especially because we just moved the scary warning back to the top of the page.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 13:01:36 2024 UTC