note 54749 added to function.time
| From: | bensing at gmail dot com | Date: | Thu, 14 Jul 2005 10:59:25 +0000 |
| Subject: | note 54749 added to function.time | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91949@lists.php.net to get a copy of this message | ||
Well, couldn't we simply use time() - X to convert the time into our own time zone? Or if
retrieving from MySQL DB,
SELECT UNIX_TIMESTAMP(timestamp) FROM table;
Before applying converttime($timestamp, $num_hrs_ahead);
<?php
function converttime($t, $num_hrs_ahead) {
return $t + $num_hrs_ahead * 60 * 60;
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.time.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54749
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54749&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54749&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54749&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54749&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54749&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54749&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54749&report=yes
Search -- http://master.php.net/manage/user-notes.php