[php-src] Issue #13066: strtotime give wrong value for ("2024-04-01") or ("2024-03-31") : visible when making a substraction
| From: | EmmanuelTuloup | Date: | Tue, 02 Jan 2024 16:16:07 +0000 |
| Subject: | [php-src] Issue #13066: strtotime give wrong value for ("2024-04-01") or ("2024-03-31") : visible when making a substraction | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246166@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13066
Author: EmmanuelTuloup
### Description
The following code:
```php
<?php
$date_fin = strtotime("2024-04-01") - strtotime("2024-03-31");
echo "date_fin=".$date_fin."\n";
```
Resulted in this output:
```
date_fin=82800
```
But I expected this output instead:
```
date_fin=86400
```
### PHP Version
php 7.4.33
### Operating System
5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux