修复时间输入组件时间戳总是多一秒的Bug

This commit is contained in:
GoEdgeLab
2021-11-21 08:44:03 +08:00
parent 0e3ed12382
commit e162ea44cb

View File

@@ -132,7 +132,7 @@ Vue.component("datetime-input", {
this.hasSecondError = false this.hasSecondError = false
date.setSeconds(second) date.setSeconds(second)
this.timestamp = Math.ceil(date.getTime() / 1000) this.timestamp = Math.floor(date.getTime() / 1000)
}, },
leadingZero: function (s, l) { leadingZero: function (s, l) {
if (l <= s.length) { if (l <= s.length) {