xref: /PHP-8.2/ext/date/tests/bug21966.phpt (revision e753493c)
1--TEST--
2Bug #21966 (date() or mktime() returning bad value for mktime month param of '2')
3--INI--
4date.timezone=Europe/London
5--FILE--
6<?php
7echo '27/3/04 = ' . strval(mktime(0,0,0,3,27,2004)) . "\n";   // 1080345600
8echo '28/3/04 = ' . strval(mktime(0,0,0,3,28,2004)) . "\n";   // -3662  - should be 108043200
9echo '28/3/04 = ' . strval(mktime(2,0,0,3,28,2004)) . "\n";   // 1080435600
10echo '29/3/04 = ' . strval(mktime(0,0,0,3,29,2004)) . "\n";   // 1080514800
11echo '30/3/04 = ' . strval(mktime(0,0,0,3,30,2004)) . "\n";   // 1080601200
12
13?>
14--EXPECT--
1527/3/04 = 1080345600
1628/3/04 = 1080432000
1728/3/04 = 1080435600
1829/3/04 = 1080514800
1930/3/04 = 1080601200
20