note 74062 deleted from function.gmdate by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 03:10:57 +0000 |
| Subject: | note 74062 deleted from function.gmdate by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142031@lists.php.net to get a copy of this message | ||
Note Submitter: tobias at dcode dot se
----
Thanks to Kogik's contribution above I was able to find a way for exec a script thru cron a
specific time (12:30, having the crontab on a US server and the actual script on a Swedish server.
$timezone = 1; // (GMT 01:00) Amsterdam, Berlin, Bern, Rom, Stockholm, Wien
$now = preg_replace('/\d{1}$/', 0, gmdate("H:i",
time()+3600*($timezone+date("I"))));
if ( $now == '12:30' ) echo 'ok to run..';