Doc #70994 [NEW]: Does gmdate() use UTC or GMT?

From: Date: Sun, 29 Nov 2015 20:21:40 +0000
Subject: Doc #70994 [NEW]: Does gmdate() use UTC or GMT?
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12893@lists.php.net to get a copy of this message
From: php at geheimeinformatie dot nl Operating system: PHP version: Irrelevant Package: PHP Language Specification Bug Type: Documentation Problem Bug description:Does gmdate() use UTC or GMT? 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". -- Edit bug report at https://bugs.php.net/bug.php?id=70994&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70994&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70994&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70994&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70994&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70994&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70994&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70994&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70994&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70994&r=support Expected behavior: https://bugs.php.net/fix.php?id=70994&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70994&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70994&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70994&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70994&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70994&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70994&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70994&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70994&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70994&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70994&r=mysqlcfg

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