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