Skip to content

Commit e801de6

Browse files
committed
Add support for global clock
1 parent d9a5aab commit e801de6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Manager/TimezoneManager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace SoureCode\Bundle\Timezone\Manager;
44

55
use DateTimeZone;
6+
use Symfony\Component\Clock\Clock;
67
use Symfony\Component\Clock\ClockInterface;
78
use Symfony\Component\Intl\Timezones;
89
use Twig\Environment;
@@ -37,7 +38,7 @@ public static function getInstance(): TimezoneManager
3738
{
3839
// in case of getting called from a command or messenger. (console)
3940
if (!isset(self::$instance)) {
40-
new self();
41+
new self([], Clock::get());
4142
}
4243

4344
return self::$instance;

0 commit comments

Comments
 (0)