Skip to content

creationTime header is coarser than the other timestamps in the same document #617

Description

@thelastdonut1

Header/@creationTime is written with getCurrentTime(GMT), so it floors to a whole second:

addAttribute(writer, "creationTime", getCurrentTime(GMT));

deviceModelChangeTime, in the same Header element twenty lines later, uses GMT_UV_SEC:

addAttribute(writer, "deviceModelChangeTime", m_modelChangeTime);

Asset timestamps and observations use it as well, which makes creationTime the coarsest timestamp in the document. I couldn't find a config option that reaches it.

Same in the JSON printer: json_printer.cpp#L67

It matters for clients using creationTime as a remote clock reading, where whole-second resolution caps the measurement at ±0.5 s.

Switching both call sites to GMT_UV_SEC needs no schema change.

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