note 93409 added to function.mktime
| From: | cebleo at n-trance dot net | Date: | Tue, 08 Sep 2009 18:36:57 +0000 |
| Subject: | note 93409 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160310@lists.php.net to get a copy of this message | ||
to ADD or SUBSTRACT times NOTE that if you dont specify the UTC zone your result is the difference
+- your server UTC delay.
if you are ina utc/GMT +1
$hours_diff = strtotime("20:00:00")-strtotime("19:00:00");
echo date('h:i', $hours_diff)." Hours";
it shows: 02:00 Hours
but if you use a default UTC time:
date_default_timezone_set('UTC');
$hours_diff = strtotime("20:00:00")-strtotime("19:00:00");
echo "<br>". date('h:i', $hours_diff);
it shows: 01:00 Hours.
----
Server IP: 69.147.83.197
Probable Submitter: 80.38.98.108
----
Manual Page -- http://www.php.net/manual/en/function.mktime.php
Edit -- https://master.php.net/note/edit/93409
Del: integrated -- https://master.php.net/note/delete/93409/integrated
Del: useless -- https://master.php.net/note/delete/93409/useless
Del: bad code -- https://master.php.net/note/delete/93409/bad+code
Del: spam -- https://master.php.net/note/delete/93409/spam
Del: non-english -- https://master.php.net/note/delete/93409/non-english
Del: in docs -- https://master.php.net/note/delete/93409/in+docs
Del: other reasons-- https://master.php.net/note/delete/93409
Reject -- https://master.php.net/note/reject/93409
Search -- https://master.php.net/manage/user-notes.php