Skip to content

Commit aa2edcc

Browse files
committed
#69 更新VUE3时间选择器选择日期后,显示
的日期与选择的日期可能会出现不一样的情况
1 parent 24f299a commit aa2edcc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/lib/utils/utils.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,12 @@ export function parseDateString(dateString, includeTime = true) {
252252
throw new Error(`Unable to parse date ${dateString}`);
253253
}
254254
return {
255-
year: date.getUTCFullYear(),
256-
month: f(date.getUTCMonth() + 1), // oh you, javascript.
257-
day: f(date.getUTCDate()),
258-
hour: f(includeTime ? date.getUTCHours() : 0),
259-
minute: f(includeTime ? date.getUTCMinutes() : 0),
260-
second: f(includeTime ? date.getUTCSeconds() : 0),
255+
year: date.getFullYear(),
256+
month: f(date.getMonth() + 1), // oh you, javascript.
257+
day: f(date.getDate()),
258+
hour: f(includeTime ? date.getHours() : 0),
259+
minute: f(includeTime ? date.getMinutes() : 0),
260+
second: f(includeTime ? date.getSeconds() : 0),
261261
};
262262
}
263263

0 commit comments

Comments
 (0)