note 20326 added to function.strtotime
| From: | piran at pobox dot com | Date: | Sat, 30 Mar 2002 14:35:58 +0000 |
| Subject: | note 20326 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28406@lists.php.net to get a copy of this message | ||
The following function is like strtotime, but converts a string which is a gmt time:
function gmstrtotime($string) {
$localtime = strtotime($string);
$localbits = localtime($localtime, true);
$gmtime = gmmktime($localbits["tm_hour"], $localbits["tm_min"],
$localbits["tm_sec"], $localbits["tm_mon"]+1, $localbits["tm_mday"],
1900+$localbits["tm_year"]);
return $gmtime;
}
--
http://www.php.net/manual/en/function.strtotime.php
http://master.php.net/manage/user-notes.php?action=edit+20326
http://master.php.net/manage/user-notes.php?action=delete+20326
http://master.php.net/manage/user-notes.php?action=reject+20326