note 128569 added to function.time
| From: | MarkAgiusUK at main dot php dot net | Date: | Wed, 24 May 2023 19:59:47 +0000 |
| Subject: | note 128569 added to function.time | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220524@lists.php.net to get a copy of this message | ||
time() returns the current time of the server clock.
It can be GMT but could be any other time zone.
To set it to the time zone you wish to use, use:
<?php
date_default_timezone_set("GMT"); // Use GMT
date_default_timezone_set("Europe/London"); // Use GMT in the winter or BST (GMT+1) in
the summer.
print date("Y-m-d, G:i:s",time())."<BR>\n";
?>
See list of timezones at https://www.php.net/manual/en/timezones.php
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 2a02:c7c:2a1f:d800:8cab:884f:e2e7:b36d)
----
Manual Page -- https://php.net/manual/en/function.time.php
Edit -- https://main.php.net/note/edit/128569
Del: integrated -- https://main.php.net/note/delete/128569/integrated
Del: useless -- https://main.php.net/note/delete/128569/useless
Del: bad code -- https://main.php.net/note/delete/128569/bad+code
Del: spam -- https://main.php.net/note/delete/128569/spam
Del: non-english -- https://main.php.net/note/delete/128569/non-english
Del: in docs -- https://main.php.net/note/delete/128569/in+docs
Del: other reasons-- https://main.php.net/note/delete/128569
Reject -- https://main.php.net/note/reject/128569
Search -- https://main.php.net/manage/user-notes.php