Skip to content

Commit 2aafece

Browse files
applied timezone to generated timestamp if exception occured
1 parent 7ad6b00 commit 2aafece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/StructuresTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ private function randomTimestamp(string $timezone = '+0000'): int
435435
$end = new \DateTime('+3 years', $zone);
436436
return rand($start->getTimestamp(), $end->getTimestamp());
437437
} catch (Exception $e) {
438-
return time();
438+
return strtotime('now ' . $timezone);
439439
}
440440
}
441441

0 commit comments

Comments
 (0)