Skip to content

Expose a time-setting API to apps (ITime is currently an empty placeholder) #233

Description

@noamsto

Summary

There is currently no way for an app to set the watch's wall-clock time. As far as I can tell the time can only be set by BLE sync from the phone. I would like to build a clock/settings app that can correct the time on-device.

What the SDK exposes today

Libs/Header/SDK/Interfaces/ITime.hpp exists but is empty apart from the destructor:

class ITime
{
public:
    virtual ~ITime() = default;
};

It also isn't obtainable — IKIP.hpp has no IID_TIME:

IID_SYSTEM      = 0x00010000,
IID_LOGGER      = 0x00020000,
IID_APP_MEMORY  = 0x00030000,
IID_APP_COMM    = 0x00040000,
IID_FILESYSTEM  = 0x000B0000,

Reading works fine — time() / localtime_r() resolve through the SDK's newlib wrappers, and ISystem::getTimeMs() gives monotonic uptime. It's only writing that has no path.

Ask

Expose a setter, e.g. ITime::setUtc(time_t) plus an IID_TIME so apps can request the interface. I appreciate there may be good reasons to gate this — conflicts with BLE sync, or wanting the kernel to stay authoritative over the RTC. If a full setter is not desirable, a narrower form would still help, for example a UTC-offset/timezone adjustment, or a "request time change" that the kernel validates.

Why it matters

The watch is usable without a paired phone for everything else, so an incorrect clock with no on-device correction is a visible gap — it also affects anything timestamped, including FIT file records.

Given ITime already ships as a placeholder, I assumed this is planned rather than deliberately withheld. Happy to be told otherwise, and glad to help test if you do implement it.

(Unrelated, but while I was here: #232 fixes the CMake build for non-ST toolchains.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions