Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/lib/Sharing/AbstractSharingManagerTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ abstract protected function getShares(
protected IFactory $l10nFactory;

private function parseTime(mixed $timestampMs): \DateTimeImmutable {
$timestampMs = (int)$timestampMs;
$time = \DateTimeImmutable::createFromFormat('U.u', number_format((float)$timestampMs / 1000.0, 3, '.', ''));
$timestampMs = (float)$timestampMs;
$time = \DateTimeImmutable::createFromFormat('U.u', number_format($timestampMs / 1000.0, 3, '.', ''));
if ($time === false) {
throw new \RuntimeException('invalid timestamp: ' . $timestampMs);
throw new \RuntimeException("invalid timestamp: $timestampMs");
}

return $time;
Expand Down
Loading