xref: /PHP-8.0/ext/date/tests/bug80057.phpt (revision 2ee23352)
1--TEST--
2Bug #80057 (DateTimeImmutable::createFromFormat() does not populate time)
3--FILE--
4<?php
5$now = new DateTimeImmutable;
6$parsed = DateTimeImmutable::createFromFormat('Y-m-d', '2020-09-04');
7$nowStr = $now->format("H:i");
8$parsedStr = $parsed->format("H:i");
9
10var_dump($nowStr == $parsedStr);
11?>
12--EXPECT--
13bool(true)
14