Stopped throwing error when system clock is out of sync

Causes a different kind of issue where the page attempts to load
for a longer time.

Affects issues:
- Fixed #1764
This commit is contained in:
Risto Lahtela 2021-02-19 11:21:49 +02:00
parent 77c3e2e74c
commit 7fc7488e16

View File

@ -112,7 +112,7 @@ public class Identifiers {
.map(Long::parseLong) .map(Long::parseLong)
.orElse(currentTime); .orElse(currentTime);
if (currentTime + TimeUnit.SECONDS.toMillis(10L) < timestamp) { if (currentTime + TimeUnit.SECONDS.toMillis(10L) < timestamp) {
throw new BadRequestException("Attempt to get data from the future! " + timestamp + " > " + currentTime); return currentTime;
} }
return timestamp; return timestamp;
} catch (NumberFormatException nonNumberTimestamp) { } catch (NumberFormatException nonNumberTimestamp) {