note 77801 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 09 Dec 2007 13:40:19 +0000 |
| Subject: | note 77801 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133008@lists.php.net to get a copy of this message | ||
Note Submitter: eves1985 at gmail dot com
----
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
?>