mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 485985 - test_history_sidebar should take in could DST correction when adding visits, r=dietrich
This commit is contained in:
parent
b90f4bc271
commit
d57ee2ed3c
@ -61,8 +61,11 @@ function add_normalized_visit(aURI, aTime, aDayOffset) {
|
||||
dateObj.setMinutes(0);
|
||||
dateObj.setSeconds(0);
|
||||
dateObj.setMilliseconds(0);
|
||||
// Days where DST changes should be taken in count.
|
||||
var previousDateObj = new Date(dateObj.getTime() + aDayOffset * 86400000);
|
||||
var DSTCorrection = (dateObj.getTimezoneOffset() - previousDateObj.getTimezoneOffset()) * 60 * 1000;
|
||||
// Substract aDayOffset
|
||||
var PRTimeWithOffset = (dateObj.getTime() + aDayOffset * 86400000) * 1000;
|
||||
var PRTimeWithOffset = (previousDateObj.getTime() - DSTCorrection) * 1000;
|
||||
print("Adding visit to " + aURI.spec + " at " + new Date(PRTimeWithOffset/1000));
|
||||
var visitId = hs.addVisit(aURI,
|
||||
PRTimeWithOffset,
|
||||
|
Loading…
Reference in New Issue
Block a user