bug81565.phpt 424 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #81565 (date parsing fails when provided with timezones including seconds)
  3. --FILE--
  4. <?php
  5. var_export(
  6. \DateTime::createFromFormat(
  7. 'Y-m-d H:i:sO',
  8. '0021-08-21 00:00:00+00:49:56'
  9. )
  10. );
  11. echo "\n", (new DatetimeZone('+01:45:30'))->getName();
  12. ?>
  13. --EXPECT--
  14. DateTime::__set_state(array(
  15. 'date' => '0021-08-21 00:00:00.000000',
  16. 'timezone_type' => 1,
  17. 'timezone' => '+00:49',
  18. ))
  19. +01:45