note 20326 deleted from function.strtotime by sniper
| From: | sniper@php.net | Date: | Tue, 21 Oct 2003 11:05:02 +0000 |
| Subject: | note 20326 deleted from function.strtotime by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59022@lists.php.net to get a copy of this message | ||
Note Submitter: piran@pobox.com
----
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;
}