06-06-2021
03:58
- last edited on
02-03-2024
16:55
by
AndreaFitbit
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-06-2021
03:58
- last edited on
02-03-2024
16:55
by
AndreaFitbit
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am playing with a Sense, and wrote a little app, just displaying the time, heartbeat, steps acceleration.
It works, but the time displayed in the app is two hours behind.
The original clockface gives the right time.
Moderator Edit: Formatting.
Anyone knows why? My first thought was TIMEZONE but apparently it is not used in the device.
Answered! Go to the Best Answer.
Accepted Solutions
06-06-2021 13:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-06-2021 13:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
It is probably timezone (especially if you're in a -2 or +2 zone).
If you use the Date object provided to the ontick listener, time zone will have been taken into account.
If you get a Date object from anywhere else, it may not be adjusted for time zone. What you get out of it depends on how you use it. Details here.
Gondwana Software
06-06-2021 13:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-06-2021 13:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
It is probably timezone (especially if you're in a -2 or +2 zone).
If you use the Date object provided to the ontick listener, time zone will have been taken into account.
If you get a Date object from anywhere else, it may not be adjusted for time zone. What you get out of it depends on how you use it. Details here.
Gondwana Software
06-07-2021 03:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-07-2021 03:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thx for ref! Yes, I am in NL, two hours from the UK 🙂

06-08-2021 02:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-08-2021 02:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
clock.addEventListener("tick", (evt) => {
clockDisplay.text = evt.date.toLocaleTimeString().slice(0, -4);
});
and
clock.addEventListener("tick", (evt) => {
clockDisplay.text = evt.date.toTimeString().slice(0, -4);
});
give a minus 2 hours difference from the official clock face, which is GMT,
here is GMT+2

