Skip to content

Commit

Permalink
fix: RTC alarm time
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyc committed Sep 4, 2020
1 parent dd02661 commit 9b538eb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions electron/src/renderer/components/MainWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,11 @@
const sec = this.timeEditValue.getSeconds()
const min = this.timeEditValue.getMinutes()
const hour = this.timeEditValue.getHours()
const setTime = new Moment().second(sec).minute(min).hour(hour).parseZone()
this.$socket.send(`rtc_alarm_set ${setTime.toISOString()} ${this.timeRepeat}`)
var alarmTime = new Moment().second(sec).minute(min).hour(hour).parseZone()
if (this.sysTime) {
alarmTime.utcOffset(this.sysTime.utcOffset(), true)
}
this.$socket.send(`rtc_alarm_set ${alarmTime.toISOString()} ${this.timeRepeat}`)
},
handleBatteryClick () {
if (this.isNewVersion) {
Expand Down

0 comments on commit 9b538eb

Please sign in to comment.