Skip to content

Commit

Permalink
fixbug timezone default
Browse files Browse the repository at this point in the history
  • Loading branch information
hekmatinasser committed Apr 2, 2018
1 parent d80a2ef commit e9e7cd6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Verta.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ public static function createTimestamp($timestamp, $timezone = null)
*/
protected static function createTimeZone($timezone = null) {
if ($timezone === null) {
$newTimezone = new DateTimeZone('Asia/Tehran');
$newTimezone = new DateTimeZone(date_default_timezone_get());
}
elseif ($timezone instanceof DateTimeZone) {
$newTimezone = $timezone;
Expand All @@ -476,8 +476,6 @@ protected static function createTimeZone($timezone = null) {
}
}

date_default_timezone_set($newTimezone->getName());

return $newTimezone;
}

Expand Down

0 comments on commit e9e7cd6

Please sign in to comment.