FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=16352&edit=1

ID: 16352
Updated by: daniel.oconnor@gmail.com
Reported By: tomasm2005 at gmail dot com
Summary: Inconsistent time conversion on window and linux with
DST
-Status: Feedback
+Status: Open
Type: Bug
Package: Date
Operating System: Windows / Linux
Package Version: Unknown
PHP Version: 5.2.9
Roadmap Versions:
New Comment:

-Status: Feedback
+Status: Open



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

[2009-06-20 16:16:09] tomasm2005

On the server the version is :

"Olson" Timezone Database Version 2009.1

On my local system it is:

"Olson" Timezone Database Version 2008.9

Is that what you meant?

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

[2009-06-20 16:14:20] tomasm2005

On my local system,. the timezone is Indian Standard Time. On the linux
server on the webhost, phpinfo() gives the

"Default Timezone" under the heading "date" as

America/Halifax

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

[2009-06-20 16:10:34] doconnor

-Status: Open
+Status: Feedback
What's your local timezone?
How recent is your timezone database? (phpinfo()?)


http://pecl.php.net/package/timezonedb/

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

[2009-06-20 07:45:55] tomasm2005

Description:
------------
While converting times from Los Angeles time to New Zealand time, if I
use the time zone as 'New Zealand Standard Time', on Windows, DST is
taken into account while on Linux, DST is not taken into account.

The bug disappears if the Date object is created as

$d = new Date(strtotime($date));

rather than

$d = new Date($date);

with the date being given in the format

YYYY-MM-DD HH:MM:SS


Test script:
---------------
http://pastebin.com/f5f2bd39e

Expected result:
----------------
Using New Zealand Standard Time : 2009-06-17 18:40:51

Using NZ : 2009-06-17 18:40:51

Actual result:
--------------
Using New Zealand Standard Time : 2009-06-17 19:40:51

Using NZ : 2009-06-17 18:40:51

( on linux)

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 27, '12 at 1:39p
activeJan 27, '12 at 1:39p
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase