#47466 [Opn->Asn]: Phd seems to ignores .ini timezone

From: Date: Sat, 11 Apr 2009 10:28:38 +0000
Subject: #47466 [Opn->Asn]: Phd seems to ignores .ini timezone
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2094@lists.php.net to get a copy of this message
 ID:               47466
 Updated by:       bjori@php.net
 Reported By:      kvz@php.net
-Status:           Open
+Status:           Assigned
 Bug Type:         Doc Build problem
 Operating System: Ubuntu Intrepid
 PHP Version:      Irrelevant
-Assigned To:      
+Assigned To:      derick
 New Comment:

I have no idea how this could not be working.
Derick, help please :)




Previous Comments:
------------------------------------------------------------------------

[2009-03-20 12:48:57] kvz@php.net

Thanks for testing it.

root@jade:/home/kevin# pear config-get php_bin
/usr/bin/php

Could it be related to my locales?
root@jade:/home/kevin# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=nl_NL.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

------------------------------------------------------------------------

[2009-03-20 12:45:28] bjori@php.net

I can't reproduce this.

Do you maybe have multiple PHP instances installed?
What does 'pear config-get php_bin' return?



------------------------------------------------------------------------

[2009-02-20 16:23:41] 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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47466&edit=1



Thread (14 messages)

« previous php.doc.bugs (#2094) next »