[php-src] Issue #13530: Bug: echo (new DateTimeImmutable('first day of this year 00:00:00'))->format('Y-m-d H:i:s'); returning February 1st instead of
January 1st

From: Date: Tue, 27 Feb 2024 09:18:44 +0000
Subject: [php-src] Issue #13530: Bug: echo (new DateTimeImmutable('first day of this year 00:00:00'))->format('Y-m-d H:i:s'); returning February 1st instead of
January 1st
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246476@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/13530 Author: niravpateljoin ### Description hello, I encountered an issue with the following code: ```php <?php echo (new DateTimeImmutable('first day of this year 00:00:00'))->format('Y-m-d H:i:s'); ``` Resulted in this output: ``` 2024-02-01 00:00:00 ``` But I expected this output instead: ``` 2024-01-01 00:00:00 ``` Thank you. ### PHP Version PHP 8.2.15 ### Operating System 22.04.3

« previous php.bugs (#246476) next »