From 84672fcb963635b27124d5f0583f6acbcc968607 Mon Sep 17 00:00:00 2001 From: Shane Tomlinson <stomlinson@mozilla.com> Date: Wed, 27 Jun 2012 10:51:29 +0100 Subject: [PATCH] Round the server timestamp DOWN to the nearest 10 minutes. issue #1849 --- resources/static/shared/modules/interaction_data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/static/shared/modules/interaction_data.js b/resources/static/shared/modules/interaction_data.js index ff0c97723..8f36514da 100644 --- a/resources/static/shared/modules/interaction_data.js +++ b/resources/static/shared/modules/interaction_data.js @@ -124,9 +124,9 @@ BrowserID.Modules.InteractionData = (function() { // server_time is sent in milliseconds. The promise to users and data // safety is the timestamp would be at a 10 minute resolution. Round to the - // nearest 10 minute mark. + // previous 10 minute mark. var TEN_MINS_IN_MS = 10 * 60 * 1000, - roundedServerTime = Math.round(result.server_time / TEN_MINS_IN_MS) * TEN_MINS_IN_MS; + roundedServerTime = Math.floor(result.server_time / TEN_MINS_IN_MS) * TEN_MINS_IN_MS; var currentData = { event_stream: self.initialEventStream, -- GitLab