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 +}