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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 10:01:31 2024 UTC