php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34347 TimzeZones Problem
Submitted: 2005-09-02 16:58 UTC Modified: 2005-09-03 13:00 UTC
From: thomas at ecommerce dot com Assigned: derick (profile)
Status: Not a bug Package: Date/time related
PHP Version: 5CVS-2005-09-02 (snap) OS: SuSE Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thomas at ecommerce dot com
New email:
PHP Version: OS:

 

 [2005-09-02 16:58 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-02 17:02 UTC] 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-03 13:00 UTC] derick@php.net
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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 10:01:30 2025 UTC