bug37514.phpt 707 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #37514 (strtotime doesn't assume year correctly).
  3. --FILE--
  4. <?php
  5. date_default_timezone_set('UTC');
  6. echo date('r', strtotime('May 18th 5:05', 1168156376)), "\n";
  7. echo date('r', strtotime('May 18th 5:05pm', 1168156376)), "\n";
  8. echo date('r', strtotime('May 18th 5:05 pm', 1168156376)), "\n";
  9. echo date('r', strtotime('May 18th 5:05am', 1168156376)), "\n";
  10. echo date('r', strtotime('May 18th 5:05 am', 1168156376)), "\n";
  11. echo date('r', strtotime('May 18th 2006 5:05pm', 1168156376)), "\n";
  12. ?>
  13. --EXPECT--
  14. Fri, 18 May 2007 05:05:00 +0000
  15. Fri, 18 May 2007 17:05:00 +0000
  16. Fri, 18 May 2007 17:05:00 +0000
  17. Fri, 18 May 2007 05:05:00 +0000
  18. Fri, 18 May 2007 05:05:00 +0000
  19. Thu, 18 May 2006 17:05:00 +0000