Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-06-11 02:20:07 +0300
committerGitHub <noreply@github.com>2020-06-11 02:20:07 +0300
commit0834bbdbc6916ffbfeb62b92eaeeb6be76c5d260 (patch)
treef5a49ee83f70c82039626421d04a679d0823dc00 /core/Date.php
parentf87703a606591de542c7e12c91a46a32088659d0 (diff)
Date factory test when date object is passed (#15998)
Diffstat (limited to 'core/Date.php')
-rw-r--r--core/Date.php2
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();