bug60236.phpt 444 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #60236 (TLA timezone dates are not converted properly from timestamp)
  3. --INI--
  4. date.timezone=America/New_York
  5. --FILE--
  6. <?php
  7. $t = new DateTime('2010-07-06 18:38:28 EDT');
  8. $ts = $t->format('U');
  9. var_dump($ts);
  10. $t->setTimestamp($ts);
  11. var_dump($t);
  12. ?>
  13. --EXPECT--
  14. string(10) "1278455908"
  15. object(DateTime)#1 (3) {
  16. ["date"]=>
  17. string(26) "2010-07-06 18:38:28.000000"
  18. ["timezone_type"]=>
  19. int(2)
  20. ["timezone"]=>
  21. string(3) "EDT"
  22. }