Skip to content
Snippets Groups Projects
Commit 1da3da3f authored by Austin King's avatar Austin King
Browse files

Merge pull request #1850 from mozilla/issue_1849_round_timestamp_down

Round the server timestamp DOWN to the nearest 10 minutes.
parents 78ce1829 84672fcb
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment