|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2021-08-01 14:41 UTC] will dot duncan dot nn at gmail dot com
Description: ------------ https://www.php.net/manual/en/function.time.php#118876 The use is implying that UTC is affected by daylight saving, which is obviously not true https://en.wikipedia.org/wiki/Coordinated_Universal_Time The user is implying that "not every day has 24 hours," however, for UTC, which is used for the `time()` function, this is never the case. Under "Mechanism" on the Wikipedia article, you can easily find the following quote: "Each day contains 24 hours and each hour contains 60 minutes." I am reporting this as this is the #2 most upvoted note for this page. It is incredibly misleading and inaccurate. Notes like this one can greatly damage new developers browsing the documentation, especially when said note appears on the top. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Some example that doesn't try to do date arithmetic by hand... echo "The date is now ", date('F jS Y', time()), ". It has been for ", time() - strtotime('today'), " seconds so far, and will remain so for another ", strtotime('tomorrow') - time(), " seconds. It has been ", time(), " seconds since midnight January 1st 1970 GMT.";