Skip to content

Commit

Permalink
Merge pull request #9968 from dmipeck/pulls/datetime-mock-defensive-copy
Browse files Browse the repository at this point in the history
FIX Defensively copy mocked datetime
  • Loading branch information
dhensby authored Jun 7, 2021
2 parents 0b22ad6 + 28b5b80 commit c79638b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/FieldType/DBDatetime.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static function now()
/** @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());
}
Expand Down

0 comments on commit c79638b

Please sign in to comment.