bug45554.phpt 557 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #45554 (Inconsistent behavior of the u format char)
  3. --INI--
  4. date.timezone=UTC
  5. --FILE--
  6. <?php
  7. $format = "m-d-Y H:i:s.u T";
  8. $d = date_create_from_format($format, "03-15-2005 12:22:29.000000 PST");
  9. echo $d->format($format), "\n";
  10. $d = date_create_from_format($format, "03-15-2005 12:22:29.001001 PST");
  11. echo $d->format($format), "\n";
  12. $d = date_create_from_format($format, "03-15-2005 12:22:29.0010 PST");
  13. echo $d->format($format), "\n";
  14. ?>
  15. --EXPECT--
  16. 03-15-2005 12:22:29.000000 PST
  17. 03-15-2005 12:22:29.001001 PST
  18. 03-15-2005 12:22:29.001000 PST