We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e51a3e8 commit cb0fd28Copy full SHA for cb0fd28
tests/CarbonInterval/TotalTest.php
@@ -15,6 +15,7 @@
15
16
use Carbon\Carbon;
17
use Carbon\CarbonInterval;
18
+use DateTimeImmutable;
19
use Generator;
20
use InvalidArgumentException;
21
use PHPUnit\Framework\Attributes\DataProvider;
@@ -294,6 +295,8 @@ public function testAlterationAfterDiff()
294
295
296
public function testAbsoluteDiff()
297
{
298
+ Carbon::setTestNowAndTimezone(new DateTimeImmutable('now UTC'));
299
+
300
$diff = Carbon::now()->addDays(15)->diff('now');
301
302
$this->assertSame(-1296000000000.0, $diff->totalMicroseconds);
0 commit comments