[php-src] Issue #15434: DateTimeImmutable Constructor
| From: | dwilbourne | Date: | Thu, 15 Aug 2024 20:10:11 +0000 |
| Subject: | [php-src] Issue #15434: DateTimeImmutable Constructor | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247507@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15434
Author: dwilbourne
### Description
The following code:
```php
<?php
new DateTimeImmutable('2012-07')
new DateTimeImmutable('2012')
```
Resulted in this output:
```
2012-07-01T00:00:00
2024-08-15T20:15:00
```
But I expected this output instead:
```
2012-07-01T00:00:00
2012-01-01T00:00:00
```
### PHP Version
PHP 8.3.10
### Operating System
Windows