diff --git a/src/Auth.php b/src/Auth.php index 4fe16af..acbd79d 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -145,7 +145,7 @@ public static function register(array $credentials, array $uniques = []) } if (static::$settings['USE_TIMESTAMPS']) { - $now = (new \Leaf\Date())->tick()->now(); + $now = (new \Leaf\Date())->tick()->format(static::$settings['TIMESTAMP_FORMAT']); $credentials['created_at'] = $now; $credentials['updated_at'] = $now; } @@ -266,7 +266,7 @@ public static function update(array $credentials, array $uniques = []) } if (static::$settings['USE_TIMESTAMPS']) { - $credentials['updated_at'] = (new \Leaf\Date())->tick()->now(); + $credentials['updated_at'] = (new \Leaf\Date())->tick()->format(static::$settings['TIMESTAMP_FORMAT']); } if (count($uniques) > 0) { diff --git a/src/Auth/Core.php b/src/Auth/Core.php index 3727718..f05ac92 100644 --- a/src/Auth/Core.php +++ b/src/Auth/Core.php @@ -27,6 +27,7 @@ class Core 'DB_TABLE' => 'users', 'AUTH_NO_PASS' => false, 'USE_TIMESTAMPS' => true, + 'TIMESTAMP_FORMAT' => 'c', 'PASSWORD_ENCODE' => null, 'PASSWORD_VERIFY' => null, 'PASSWORD_KEY' => 'password',