diff --git a/src/Verta.php b/src/Verta.php index 976dd04..14c8937 100755 --- a/src/Verta.php +++ b/src/Verta.php @@ -13,7 +13,6 @@ namespace Hekmatinasser\Verta; use DateTime; use DateTimeZone; -use Illuminate\Support\Carbon; use InvalidArgumentException; use Hekmatinasser\Notowo\Notowo; @@ -247,7 +246,8 @@ class Verta extends DateTime { */ public function __construct($datetime = null, $timezone = null) { if ($datetime === null) { - $instance = Carbon::now()->getTimestamp(); + $object = new DateTime(); + $instance = $object->getTimestamp(); } elseif (is_string($datetime)){ $object = date_create($datetime); @@ -509,7 +509,8 @@ class Verta extends DateTime { public static function createGregorian($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $timezone = null) { - $now = date('Y-n-j-G-i-s', Carbon::now()->getTimestamp()); + $object = new DateTime(); + $now = date('Y-n-j-G-i-s', $object->getTimestamp()->getTimestamp()); $defaults = array_combine(array('year', 'month', 'day', 'hour', 'minute', 'second'), explode('-', $now)); $year = $year === null ? intval($defaults['year']) : $year;