Impossible to get Time sensor data on API 2.0 in application. #269
Closed
zdunex25
started this conversation in
Developer Feedback
Replies: 1 comment 1 reply
-
@zdunex25 Hello, getTime is a method that needs to be used through a function call. import { Time } from '@zos/sensor'
Page({
build() {
const timex = new Time()
const utc = timex.getTime()
console.log('utc', utc)
}
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Code is:
Output from console:
I>0>13.043 quickjs- SBEngine UTC: getTime(){return this.instance.utc}
happens for all: getFullYear(), getMonth(), getDate(), etc.
@MyoungXUE @silver-zepp
Beta Was this translation helpful? Give feedback.
All reactions