(v, forceRTC=0)
| 800 | } |
| 801 | |
| 802 | setTime(v, forceRTC=0) { |
| 803 | let tz = this.prefs.tz - 11; |
| 804 | Time.timezone = tz * 3600; |
| 805 | |
| 806 | Time.set(v + Time.timezone); |
| 807 | let dst = (this.prefs.dst == 2) ? this.checkDSTObserved() : this.prefs.dst; |
| 808 | Time.dst = dst * 3600; |
| 809 | |
| 810 | Time.set(v); |
| 811 | |
| 812 | if (this.rtc.exists && (forceRTC || !this.rtc.valid)) { |
| 813 | if (!this.rtc.enabled) { |
| 814 | this.rtc.enabled = 1; |
| 815 | } |
| 816 | this.rtc.seconds = v; |
| 817 | this.rtc.valid = 1; |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | fetchTime() { |
| 822 | if (this.rtc.valid) |
no test coverage detected