From 93476612bac4f8c03cc5429f770bb84568c8904f Mon Sep 17 00:00:00 2001 From: amir Date: Sat, 2 Jan 2021 13:53:58 +0400 Subject: [PATCH] Fix ignoring time zone bug --- src/Traits/Creator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Traits/Creator.php b/src/Traits/Creator.php index 436fb73..42ed6b0 100644 --- a/src/Traits/Creator.php +++ b/src/Traits/Creator.php @@ -35,6 +35,7 @@ trait Creator try { parent::__construct($datetime, static::createTimeZone($timezone)); + parent::setTimezone(static::createTimeZone($timezone)); } catch (Exception $exception) { throw new InvalidArgumentException(sprintf("Unknown datetime '%s'", $datetime)); } @@ -400,4 +401,4 @@ trait Creator return static::createJalali(null, null, null, $hour, $minute, $second, $timezone); } -} \ No newline at end of file +}