mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Defensively copy mocked datetime
This commit is contained in:
parent
0b22ad65f2
commit
28b5b803be
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user