Closed
Description
<?php
require_once __DIR__.'/vendor/autoload.php';
$timeLimit = \DateInterval::createFromDateString('2 hours');
$safeDateTime = new \Safe\DateTimeImmutable();
$phpDateTime = new \DateTimeImmutable();
\var_dump($safeDateTime->modify('+3 hours') < $safeDateTime->add($timeLimit)); // true
\var_dump($phpDateTime->modify('+3 hours') < $phpDateTime->add($timeLimit)); // false
Given this snippet, I would expect that both are false
, but when using \Safe\DateTimeImmutable
I am getting true
.
Metadata
Metadata
Assignees
Labels
No labels