Doc #74562 [Opn->Csd]: DateTimeZone->getLocation() returns false
| From: | vrana@php.net | Date: | Mon, 29 Jan 2018 23:20:39 +0000 |
| Subject: | Doc #74562 [Opn->Csd]: DateTimeZone->getLocation() returns false | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15386@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74562&edit=1
ID: 74562
Updated by: vrana@php.net
Reported by: schmidt@php.net
Summary: DateTimeZone->getLocation() returns false
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Date/time related
Operating System: Linux
PHP Version: 7.1.4
-Assigned To:
+Assigned To: vrana
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2018-01-29 23:20:33] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=344087
Log: Document returning false (bug #74562)
------------------------------------------------------------------------
[2017-05-30 11:47:14] schmidt@php.net
If this behaviour is intentional, at least the documentation needs to be updated.
However, I think the current behaviour is rather confusing. I understand that DateTimeZone
internally has a timezone_type property, but this is not very explicitly described in the
documentation. From a UX point of view, I would expect new DateTime('2017-01-01 12:00
Etc/GMT'), new DateTime('2017-01-01 12:00Z'), new DateTime('2017-01-01 12:00
UTC') and new DateTime('2017-01-01 12:00+00:00') to have the same location.
------------------------------------------------------------------------
[2017-05-20 07:48:43] schmidt@php.net
Please reopen this bug. heiglandreas@... seems to be referring to something else when he closed it.
------------------------------------------------------------------------
[2017-05-15 14:53:00] schmidt@php.net
In my original report, I wrote "Etc/UTC+2" by mistake. It should read
"Etc/GMT+2".
------------------------------------------------------------------------
[2017-05-15 14:47:30] schmidt@php.net
>The docs clearly states that the method will return 'false' in an error case.
Where? I do not see any mention of this on http://php.net/manual/en/datetimezone.getlocation.php
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=74562
--
Edit this bug report at https://bugs.php.net/bug.php?id=74562&edit=1