xref: /PHP-8.2/ext/date/tests/bug79716.phpt (revision 091c0920)
1--TEST--
2Bug #79716 (Invalid date time created (with day "00"))
3--FILE--
4<?php
5$datetime = new \DateTimeImmutable(
6    '2770-01-00 15:00:00.000000',
7    new \DateTimeZone('UTC')
8);
9\var_dump($datetime->format('j') === '0');
10\var_dump($datetime);
11?>
12--EXPECTF--
13bool(false)
14object(DateTimeImmutable)#%d (%d) {
15  ["date"]=>
16  string(26) "2769-12-31 15:00:00.000000"
17  ["timezone_type"]=>
18  int(3)
19  ["timezone"]=>
20  string(3) "UTC"
21}
22