note 63125 deleted from function.strtotime by derick
| From: | derick@php.net | Date: | Sun, 15 Jul 2007 12:39:24 +0000 |
| Subject: | note 63125 deleted from function.strtotime by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-128557@lists.php.net to get a copy of this message | ||
Note Submitter: Ethilien
----
If you are using a version of php before date_default_timezone_set() was added, and you want to get
a date in GMT, use this function.
<?php
function gmstrtotime ($s)
{
$t = strtotime($s);
$zone = intval(date("O"))/100;
$t += $zone*60*60;
return $t;
}
?>