bug17988.phpt 1.2 KB

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Bug #17988 (strtotime handling of postgresql timestamps)
  3. --INI--
  4. date.timezone=GMT
  5. --FILE--
  6. <?php
  7. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728"))."\n";
  8. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 GMT"))."\n";
  9. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 EDT"))."\n";
  10. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-00"))."\n";
  11. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+00"))."\n";
  12. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-04"))."\n";
  13. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+04"))."\n";
  14. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-0300"))."\n";
  15. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0300"))."\n";
  16. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-0330"))."\n";
  17. echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0330"))."\n";
  18. ?>
  19. --EXPECT--
  20. 2002-06-25 14:18:48
  21. 2002-06-25 14:18:48
  22. 2002-06-25 18:18:48
  23. 2002-06-25 14:18:48
  24. 2002-06-25 14:18:48
  25. 2002-06-25 18:18:48
  26. 2002-06-25 10:18:48
  27. 2002-06-25 17:18:48
  28. 2002-06-25 11:18:48
  29. 2002-06-25 17:48:48
  30. 2002-06-25 10:48:48