note 108793 deleted from function.date-default-timezone-set by googleguy

From: Date: Tue, 22 Oct 2013 06:45:53 +0000
Subject: note 108793 deleted from function.date-default-timezone-set by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196628@lists.php.net to get a copy of this message
Note Submitter: Stephan Rudlof ---- Problem with the table above: timezone offset from Javascript contains summertime offset, but php wants to have geographic timezone without summertime derivation (seems to compute it itself). Here is an alternative, which works for me (summertime in Germany): <?php /* May fail for timezones not 'Etc/GMT*' (if they are summertime). */ $zonelist = array('Etc/GMT+12' => -12.00, 'Etc/GMT+11' => -11.00, 'Etc/GMT+10' => -10.00, 'Etc/GMT+9' => -9.00, 'Etc/GMT+8' => -8.00, 'Etc/GMT+7' => -7.00, 'Etc/GMT+6' => -6.00, 'Etc/GMT+5' => -5.00, 'America/Caracas' => -4.30, 'Etc/GMT+4' => -4.00, 'America/St_Johns' => -3.30, 'Etc/GMT+3' => -3.00, 'Etc/GMT+2' => -2.00, 'Etc/GMT+1' => -1.00, 'Etc/GMT' => 0, 'Etc/GMT-1' => 1.00, 'Etc/GMT-2' => 2.00, 'Etc/GMT-3' => 3.00, 'Asia/Tehran' => 3.30, 'Etc/GMT-4' => 4.00, 'Etc/GMT-5' => 5.00, 'Asia/Kolkata' => 5.30, 'Asia/Katmandu' => 5.45, 'Etc/GMT-6' => 6.00, 'Asia/Rangoon' => 6.30, 'Etc/GMT-7' => 7.00, 'Etc/GMT-8' => 8.00, 'Etc/GMT-9' => 9.00, 'Australia/Darwin' => 9.30, 'Etc/GMT-10' => 10.00, 'Etc/GMT-11' => 11.00, 'Etc/GMT-12' => 12.00, 'Etc/GMT-13' => 13.00); ?>

« previous php.notes (#196628) next »