[php-src] PR #13383: int|float for DateTime::setTimestamp
| From: | divinity76 | Date: | Tue, 13 Feb 2024 13:03:16 +0000 |
| Subject: | [php-src] PR #13383: int|float for DateTime::setTimestamp | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25071@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13383
Author: divinity76
just like the constructor accepts
```
new DateTime("@0.123456"); // 1970-01-01 00:00:00.123456
new DateTime("@".microtime(true));
```
now setTimestamp accepts it too:
```
$dt->setTimestamp(0.123456); // 1970-01-01 00:00:00.123456
$dt->setTimestamp(microtime(true));
```
resolves https://github.com/php/php-src/issues/13376