MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / setRTCTimeLocal

Function setRTCTimeLocal

examples/drivers/m5stickc-rtc/main.js:32–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30}
31
32function setRTCTimeLocal() {
33 const d = new Date();
34 trace(`Set time: ${d.getTime()} ${d.toString()} tz:${Time.timezone} dst:${Time.dst}\n`);
35 rtc.time = d.getTime();
36 const read = rtc.time;
37 const s = new Date(read);
38 trace(`Get time: ${read} ${s.toString()}\n`)
39}
40
41const render = new Poco(screen, {
42 rotation: config.rotation

Callers 1

main.jsFile · 0.85

Calls 2

getTimeMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected