From 4a5105e95f2cfeda251d5a0e43eec8e50a725606 Mon Sep 17 00:00:00 2001 From: Wes Johnston Date: Mon, 18 Jul 2011 09:19:35 -0700 Subject: [PATCH] Bug 671167 - History time ranges should be based on local timezone. r=mfinkle --- mobile/chrome/content/bindings.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mobile/chrome/content/bindings.xml b/mobile/chrome/content/bindings.xml index f5724890f673..419b0dcbf4d8 100644 --- a/mobile/chrome/content/bindings.xml +++ b/mobile/chrome/content/bindings.xml @@ -1309,7 +1309,12 @@ let lastTitle = null; let msPerDay = 86400000; let msPerWeek = msPerDay * 7; - let today = new Date(Date.now() - (Date.now() % msPerDay)); + + let today = new Date(); + today.setHours(0); + today.setMinutes(0); + today.setSeconds(0); + for (let i = 0; i < childCount; i++) { let node = rootNode.getChild(i); let time = new Date(node.time / 1000); // node.time is microseconds