[php-src] Issue #14383: DateTime::createFromTimestamp overflowed microseconds value

From: Date: Fri, 31 May 2024 04:51:23 +0000
Subject: [php-src] Issue #14383: DateTime::createFromTimestamp overflowed microseconds value
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246990@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14383 Author: ranvis ### Description The following code: ```php <?php echo DateTime::createFromTimestamp(0.999_999_9)->format('s.u'), "\n"; ``` Resulted in this output: ``` 00.1000000 ``` But I expected this output instead: ``` 01.000000 or 00.999999 ``` Though some don't agree, I prefer to 00.999999 than 01.000000 for date and time. 23:59:59.999_999_9 is not technically tomorrow. ### PHP Version dev-master 5e242fe ### Operating System irrelevant

« previous php.bugs (#246990) next »