|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-12-06 21:55 UTC] stas@php.net
-Package: PHP Language Specification
+Package: Date/time related
[2015-12-19 16:58 UTC] ajf@php.net
[2015-12-19 17:05 UTC] derick@php.net
[2015-12-19 17:06 UTC] derick@php.net
-Status: Open
+Status: Not a bug
[2015-12-19 17:06 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 09:00:01 2025 UTC |
Description: ------------ The name of the function "gmdate" seems to suggest GMT, but some experimentation indicates that this function formats a date in UTC. The documentation currently says: > gmdate — Format a GMT/UTC date/time > [...] > Identical to the date() function except that the time returned is Greenwich Mean Time (GMT). and most user submitted notes on the same page seem to indicate that GMT and UTC are basically the same thing. They're not. GMT observes European Summer Time (or "daylight saving" to some), while UTC does not. So for about half the time, the resulting values wil differ by one hour. I recommend we change the documentation to remove all references to Greenwich (save for the one in the function name), and only ever mention UTC. Test script: --------------- According to the following script: <?php var_dump(date("e")); var_dump(gmdate("e")); ?> which outputs: > string(13) "Europe/Berlin" > string(3) "UTC" the documentation should read "UTC", not "GMT".