diff --git a/examples/wms-time.js b/examples/wms-time.js index 7f65044055..18bce02a25 100644 --- a/examples/wms-time.js +++ b/examples/wms-time.js @@ -46,7 +46,7 @@ function updateInfo() { function setTime() { startDate.setMinutes(startDate.getMinutes() + 15); - if (startDate > Date.now()) { + if (startDate > new Date()) { startDate = threeHoursAgo(); } layers[1].getSource().updateParams({'TIME': startDate.toISOString()});