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

 ID:                 60236
 Updated by:         der...@php.net
 Reported by:        s...@php.net
 Summary:            TLA timezone dates are not converted properly from
                     timestamp
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Date/time related
 Operating System:   *
 PHP Version:        5.4.0beta2
 Assigned To:        derick
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2011-11-24 17:13:34] der...@php.net

Automatic comment from SVN on behalf of derick
Revision: http://svn.php.net/viewvc/?view=revision&revision=319767
Log: - Fixed bug #60236 (TLA timezone dates are not converted properly from
  timestamp).
- Fixed bug #55253 (DateTime::add() and sub() result -1 hour on objects with
  time zone type 2).

And fixed some test cases.

------------------------------------------------------------------------
[2011-11-21 02:18:55] dani...@php.net

This is probably related to https://bugs.php.net/bug.php?id=55253

------------------------------------------------------------------------
[2011-11-07 18:10:33] s...@php.net

Description:
------------
If you convert a date with TLA timezone (like EDT) to timestamp, and then 
convert 
it back from timestamp, resulting date is off by an hour. See example below.

Test script:
---------------
<?php
$t   = new DateTime('2010-07-06 18:38:28 EDT'); 
$ts = $t->format('U');
var_dump($ts);
$t->setTimestamp($ts);
var_dump($t);


Expected result:
----------------
string(10) "1278455908"
object(DateTime)#1 (3) {
  ["date"]=>
  string(19) "2010-07-06 18:38:28"
  ["timezone_type"]=>
  int(2)
  ["timezone"]=>
  string(3) "EDT"
}


Actual result:
--------------
string(10) "1278455908"
object(DateTime)#1 (3) {
  ["date"]=>
  string(19) "2010-07-06 17:38:28"
  ["timezone_type"]=>
  int(2)
  ["timezone"]=>
  string(3) "EDT"
}



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



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

Reply via email to