You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The integer types for local times for timeutil conversion functions timeutil_sync_ref_from_local and timeutil_sync_local_from_ref are inconsistent. One presumes the local time is a signed 64bit integer, while the other assume an unsigned 64bit integer.
This is not a bug. Reference times are defined to be non-negative, hence an unsigned output from timeutil_sync_ref_from_local (negative reconstructed reference times result in a -ERANGE error return).
On the other hand a local time reconstructed from a reference time can be negative, if the reference time corresponds to an event that occurs before the system started.
I'll see if I can tweak the documentation so this is more clear.
Describe the bug
The integer types for local times for timeutil conversion functions
timeutil_sync_ref_from_local
andtimeutil_sync_local_from_ref
are inconsistent. One presumes the local time is a signed 64bit integer, while the other assume an unsigned 64bit integer.zephyr/include/sys/timeutil.h
Lines 253 to 254 in cd9421a
zephyr/include/sys/timeutil.h
Lines 277 to 278 in cd9421a
The text was updated successfully, but these errors were encountered: