DatePicker: timezone

pull/5181/head
emododu 2017-05-31 16:18:01 +08:00 committed by 杨奕
parent 3284e0a662
commit 6563a3a804
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@
const clearHours = function(time) {
const cloneDate = new Date(time);
const timeZoneOffset = cloneDate.getTimezoneOffset();
const timeZone = timeZoneOffset >= 0 ? 24 - timeZoneOffset / 60 : timeZoneOffset / 60;
const timeZone = timeZoneOffset >= 0 ? 24 - timeZoneOffset / 60 : Math.abs(timeZoneOffset) / 60;
cloneDate.setHours(timeZone, 0, 0, 0);
return cloneDate.getTime();
};