FIX Defensively copy mocked datetime

This commit is contained in:
David Peck 2021-06-05 16:46:19 +12:00
parent 0b22ad65f2
commit 28b5b803be

View File

@ -173,7 +173,7 @@ class DBDatetime extends DBDate implements TemplateGlobalProvider
/** @var DBDatetime $now */
$now = null;
if (self::$mock_now) {
$now = self::$mock_now;
$now = DBField::create_field('Datetime', self::$mock_now->Value);
} else {
$now = DBField::create_field('Datetime', time());
}