diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-06-11 02:20:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 02:20:07 +0300 |
commit | 0834bbdbc6916ffbfeb62b92eaeeb6be76c5d260 (patch) | |
tree | f5a49ee83f70c82039626421d04a679d0823dc00 /core/Date.php | |
parent | f87703a606591de542c7e12c91a46a32088659d0 (diff) |
Date factory test when date object is passed (#15998)
Diffstat (limited to 'core/Date.php')
-rw-r--r-- | core/Date.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Date.php b/core/Date.php index a932cd9cad..276cd6d0c3 100644 --- a/core/Date.php +++ b/core/Date.php @@ -123,7 +123,7 @@ class Date public static function factory($dateString, $timezone = null) { if ($dateString instanceof self) { - $dateString = $dateString->toString(); + return new Date($dateString->timestamp, $dateString->timezone); } if ($dateString === 'now') { $date = self::now(); |