note 77801 added to function.date
| From: | eves1985 at gmail dot com | Date: | Thu, 13 Sep 2007 13:57:38 +0000 |
| Subject: | note 77801 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130465@lists.php.net to get a copy of this message | ||
If you want to define your own time without having trouble with the server time you could do this;
<?
$timeZoneOffset = +1; //timezone where the user is (use an additional script to determine this
variable)
$H = (date('H')+date('O'))+$timeZoneOffset; //hour
$i = date('i'); //minutes
$s = date('s'); //seconds
$m = date('m'); //month
$d = date('d') //day
$Y = date('Y') //year
$date = date('Y-m-d, H:i:s',mktime($H,$i,$s,$m,$d,$Y)); // will output somthing like
2007-09-13, 03:52:05
?>
----
Server IP: 85.12.26.134
Probable Submitter: 137.224.231.64
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/77801
Del: integrated -- https://master.php.net/note/delete/77801/integrated
Del: useless -- https://master.php.net/note/delete/77801/useless
Del: bad code -- https://master.php.net/note/delete/77801/bad+code
Del: spam -- https://master.php.net/note/delete/77801/spam
Del: non-english -- https://master.php.net/note/delete/77801/non-english
Del: in docs -- https://master.php.net/note/delete/77801/in+docs
Del: other reasons-- https://master.php.net/note/delete/77801
Reject -- https://master.php.net/note/reject/77801
Search -- https://master.php.net/manage/user-notes.php