HeexSDK methods requires timestamps in UTC time.
For example, every timestamp generated by default uses thestd::chrono::system_clock::now()
.
Format
HeexSDK uses the ISO 8601-1:2019 standard. It is a string representation of dates and times. The main advantage is the availability of many libraries dealing with this representation. There are many options, but the format favored by Heex isYYYY-MM-DDThh:mm:ss.ssssssZ
.
YYYY
is the yearMM
is the monthDD
is the dayT
is a separatorhh
is for hoursmm
is for minutesss
is for secondsssssss
(following the dot) is for microsecondsZ
to indicate that we are in UTC+0
2021-07-07T13:54:05.123456Z
See also this Wikipedia article for more details.
Notes on Usage & Conversion
Heex uses the std::chrono library to generate or read timestamps. Therefore, you need to convert your timestamp if it is stored in Posix, Boost or Unix time (time_t). Some utility functions do exist in the C++ Standard Library (std) to perform the conversion. In addition, some middleware like ROS2 also provide a custom time format that need to be converted. We also provide custom conversion libraries, that can be found in ourHeexUtilsTime.h
file.