php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76748 date format timezone abbreviations and changes not well documented
Submitted: 2018-08-15 15:49 UTC Modified: 2018-08-15 16:05 UTC
From: georgekazdev at gmail dot com Assigned:
Status: Open Package: Date/time related
PHP Version: 7.1.20 OS: linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-08-15 15:49 UTC] georgekazdev at gmail dot com
Description:
------------
From versions 7.0.17 to 7.0.18 and from 7.1.3 to 7.1.4 many timezone abbreviations were removed as discussed here: http://mm.icann.org/pipermail/tz/2017-February/024837.html

But the changelog (http://php.net/ChangeLog-7.php) does not mention this and neither does http://www.php.net/manual/en/function.date.php

Before the change, the expected return for the test script below was:
MVT
MVT

but after the change it's
+05
+05

To save time tracing this problem, please consider updating documentation to mention the changes, either to say that the 'T' formatter will return the date diff if there is no abbreviation, or to mention it in the change log. It would help in knowing that it's not a bug. A list of valid abbreviations would also be useful. 

Thanks


Test script:
---------------
<?php

$date = new DateTime('Feb 13, 2009 11:31:30 PM', new DateTimeZone('Indian/Maldives'));
echo $date->format('T').PHP_EOL;

$date = date_create('Feb 13, 2009 11:31:30 PM', timezone_open('Indian/Maldives'));
echo date_format($date, 'T').PHP_EOL;

Expected result:
----------------
MVT
MVT


Actual result:
--------------
+05
+05

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-15 16:00 UTC] cmb@php.net
-Package: Documentation problem +Package: Date/time related
 [2018-08-15 16:05 UTC] georgekazdev at gmail dot com
-: egeorgekaz at gmail dot com +: georgekazdev at gmail dot com
 [2018-08-15 16:05 UTC] georgekazdev at gmail dot com
changed email address
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Dec 10 01:01:24 2018 UTC