Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AbsoluteDateClock.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class AbsoluteDateClock
{
public static function now(\DateTimeZone $timeZone): AbsoluteDate
public static function now(\DateTimeZone $timeZone = null): AbsoluteDate
{
return self::relative('now', $timeZone);
}
Expand Down
8 changes: 8 additions & 0 deletions tests/AbsoluteDateClockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ public function testNow(): void
);
}

public function testNowWithoutDateTimeZone(): void
{
self::assertEquals(
'2025-03-12',
AbsoluteDateClock::now()
);
}

public function testRelative(): void
{
self::assertEquals(
Expand Down
Loading