Doc #66510 [Opn->Csd]: Important information missing in docs of DateTimeZone::listAbbreviations

From: Date: Fri, 13 May 2022 14:16:24 +0000
Subject: Doc #66510 [Opn->Csd]: Important information missing in docs of DateTimeZone::listAbbreviations
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19430@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66510&edit=1

 ID:                 66510
 Updated by:         git@php.net
 Reported by:        jonathan at hogervorst dot info
 Summary:            Important information missing in docs of
                     DateTimeZone::listAbbreviations
-Status:             Open
+Status:             Closed
 Type:               Documentation Problem
 Package:            Date/time related
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of derickr
Revision: https://github.com/php/doc-en/commit/fd8fcbcd6f1e2482e32bb544bbc23b8dc154bb91
Log: Fixed bug #66510: Clarify the return values of DateTimeZone::listAbbreviations


Previous Comments:
------------------------------------------------------------------------
[2014-01-19 17:30:16] kulakov74 at yandex dot ru

They should add a description for all the timezone abbreviations, cause names like 'yst'
and 'yert' don't make much sense and, more important, they should add the periods of
time when the zones were effective. 

At the same time, provided the periods are added to the info, I can hardly imagine a php developer
who will want to find the right abbreviation for a date (the one that was effective for the date) by
scannning the list, because the internal PHP functions like date(), strtotime() and the DateTime
class already do it automatically for you whenever they perform date manipulations. 

So I doubt DateTimeZone::listAbbreviations() is needed at all.

------------------------------------------------------------------------
[2014-01-18 00:11:07] jonathan at hogervorst dot info

Description:
------------
---
From manual page: http://www.php.net/datetimezone.listabbreviations
---

Important information about the return value of this function is missing in the documentation. For
example, the fact that historical timezones are included is very relevant.

The lack of this information results in actually wrong scripts. See for example this (kind of
popular) code (and my comment): http://stackoverflow.com/a/2839396/251760

I have added a comment to the documentation, trying to explain the return value of this function and
informing people of the 'risks' of using this function when not considering this: http://www.php.net/manual/en/datetimezone.listabbreviations.php#114161

Hopefully the documentation can be enhanced :-)



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=66510&edit=1


Thread (3 messages)

« previous php.doc.bugs (#19430) next »