#34347 [Asn->Bgs]: TimzeZones Problem
| From: | derick@php.net | Date: | Sat, 03 Sep 2005 11:01:01 +0000 |
| Subject: | #34347 [Asn->Bgs]: TimzeZones Problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84465@lists.php.net to get a copy of this message | ||
ID: 34347
Updated by: derick@php.net
Reported By: thomas at ecommerce dot com
-Status: Assigned
+Status: Bogus
Bug Type: Date/time related
Operating System: SuSE Linux
PHP Version: 5CVS-2005-09-02 (snap)
Assigned To: derick
New Comment:
This is not a bug, there is no "timezone CEST", it is simply the
abbreviation for some times during the year for several European
Timezones. Use Europe/Berling as timezone f.e.
Previous Comments:
------------------------------------------------------------------------
[2005-09-02 17:02:59] derick@php.net
This has nothing to do with SPL though, also, using a TZ environment
variable is NOT recommended in PHP 5.1 and up.
------------------------------------------------------------------------
[2005-09-02 16:58:50] thomas at ecommerce dot com
Description:
------------
PHP 5.1 don't know some timezones that was avaible in PHP 5.0. At
first, the setted TZ come from a SPL function ( date() ) and afterwards
saying it doesn't know it.
Ans why will this code bellow set 'UTC' in the ENV var instead of the
before setted CEST?
Reproduce code:
---------------
<?php
error_reporting(E_ALL);
echo getenv('TZ') . "\n";
echo date('T') . "\n";
putenv('TZ=' . date('T'));
echo getenv('TZ') . "\n";
echo date('T') . "\n";
Expected result:
----------------
CEST
CEST
UTC
Actual result:
--------------
CEST
CEST
Notice: date(): Timezone setting (date.timezone) or TZ environment
variable contains an unknown timezone. in /home/Thomas/test.php on line
9
UTC
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34347&edit=1