# Time(0) is wrong until after an app sync

**URL:** <https://dev.unawatch.com/t/time-0-is-wrong-until-after-an-app-sync/103>\
**Category:** Building with UNA\
**Created:** [September 28, 2026, 9:12pm UTC](https://dev.unawatch.com/t/time-0-is-wrong-until-after-an-app-sync/103 "2026-09-28T21:12:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![edent](https://yyz2.discourse-cdn.com/flex048/user_avatar/dev.unawatch.com/edent/32/74_2.png) [@edent](https://dev.unawatch.com/u/edent)\
**Post date:** [September 28, 2026, 9:12pm UTC](https://dev.unawatch.com/t/time-0-is-wrong-until-after-an-app-sync/103/1 "2026-09-28T21:12:38Z")

</div>

My Una Watch is set to BST. Calling `time(0)` in my Glance sometimes gets the wrong time.

I’m writing an app which uses the Unix Epoch for time:

`const std::time_t t = std::time(0);`

I restarted my Una Watch and opened the Glance. That showed `1790633146`, which was an hour ahead of the real time `1790629546`.

I opened the Una Android app, let it sync, then opened my Glance again. It showed the correct time.

Is this expected behaviour? If so, is there a way to _always_ get the correct Epoch time for UTC?

(It has been nearly 30 years since I last did C++ in anger. Please feel free to tell me I’m missing something obvious!)

---

<div class="post-metadata">

**Author:** ![smokey\_foss](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@smokey\_foss](https://dev.unawatch.com/u/smokey_foss)\
**Post date:** [September 30, 2026, 3:43am UTC](https://dev.unawatch.com/t/time-0-is-wrong-until-after-an-app-sync/103/2 "2026-09-30T03:43:04Z")

</div>

Hi @edent, I tried to reproduce this on my side and couldn’t, which might at least help narrow it down.

On firmware 1.5.0 I restarted the watch with the phone’s Bluetooth off, and opened two of my apps before any sync. Both read `std::time(nullptr)` and convert from UTC, so the same call as your `time(0)`. The time was right before the sync and still right after it. I ran it twice: once with the phone’s timezone as I normally have it, and once with the phone set to London so the watch was on BST like yours. No hour difference either way.

The thing that stood out in your numbers is that the gap is exactly 3600 seconds, which is BST’s daylight-saving hour, so my first guess was the watch losing DST across a restart. The London run didn’t show it though. The two differences I can see between your setup and mine are that yours is a Glance and mine were apps, and possibly the firmware. Which version are you on?

If it’s useful, I can put together a tiny Glance that shows the raw `time(0)` next to UTC and local time, so we’d both be looking at the same thing.
