| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2009-02-20 16:23 UTC] kvz@php.net
 Description:
------------
It looks like phd is explicity trying to use the system default timezone. 
 kevin@jade:/mnt/aeon# php --ini |egrep 'php\.ini$'
 Loaded Configuration File:         /etc/php5/cli/php.ini
So I've set the timezone in /etc/php5/cli/php.ini to:
 kevin@jade:~/workspace/peardoc$ cat /etc/php5/cli/php.ini |grep timezone
 ; Defines the default timezone used by the date functions
 date.timezone = 'Europe/Amsterdam'
Still phd keeps reporting: Strict Standards: date(): It is not safe to rely on the system's timezone settings.
When I change the head of $(which phd) to:
 #!/usr/bin/php
 <?php
 date_default_timezone_set('Europe/Amsterdam');
The warnings disappear.
When I change the head of $(which phd) to:
 phpinfo(); exit();
It reads:
 Default timezone => Europe/Berlin
 date.timezone => 'Europe/Amsterdam' => 'Europe/Amsterdam'
Reproduce code:
---------------
dpkg-reconfigure tzdata
 Current default timezone: 'Europe/Amsterdam'
 Local time is now:      Fri Feb 20 17:05:33 CET 2009.
 Universal Time is now:  Fri Feb 20 16:05:33 UTC 2009.
date +%Z
 CET
phd -f xhtml -t pearchunkedhtml -o /tmp -d .manual.xml 
Expected result:
----------------
No timezone warnings
Actual result:
--------------
Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/php/phd/config.php on line 78
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 07:00:01 2025 UTC | 
I got the same issue on Windows SBS 2003, IIS6, FastCGI, PHP 5.3.0. php.ini has date.timezone = Australia/ACT, but warning still appears. If I add <?php date_default_timezone_set('Australia/ACT'); at the begining warning goes away.Same issue. Win server 2003, IIS 6, PHP 5.3.2 Was having problems - PHP info page reported default timezone set ("Australia/Melbourne") but the error was still being logged and the php_info page reported "no value" in the configured timezone. Opened the php.ini file in a text editor and saved it as a differnt name. I then opened a command prompt window and copied the newly save file file to overwrite the original file. Problem resolved (no more errors, php_info correctly reporting configured timezone). Not sure why. I did notice something odd when I initially copied php.ini-production using windows explorer (I used ^C, ^V to create the copy, then renamed the "Copy of ..." to "php.ini". I ended up with 2 files of the same name, one of which had a (2) after it. I renamed the files again using windows explorer (using the date stamp to decide which was which)). Maybe some odd windows behaviour caused this?