Prefer Date.now() when possible

This commit is contained in:
Maximilian Krög
2021-07-02 23:01:11 +02:00
parent f506f4bdc9
commit d7d0eeb7c7
4 changed files with 4 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ function updateInfo() {
function setTime() {
startDate.setMinutes(startDate.getMinutes() + 15);
if (startDate > new Date()) {
if (startDate > Date.now()) {
startDate = threeHoursAgo();
}
layers[1].getSource().updateParams({'TIME': startDate.toISOString()});