180 static std::string
NanoSecTzToHHMMSS(uint64_t timestamp_ns, int16_t tz_offset_min, int16_t dst_offset_min);
195 static std::string
NanoSecTzToDDMMYYYY(uint64_t timestamp_ns, int16_t tz_offset_min, int16_t dst_offset_min);
202 static void Trim(std::string &text);
214 double value, uint8_t decimals,
bool fixed =
false,
215 const std::string &unit = {});
Support class for the MDF library.
Definition mdfhelper.h:15
static uint64_t CanOpenDateArrayToNs(const std::vector< uint8_t > &buffer)
Converts from a CANopen 7 byte Date array to nanoseconds since 1970.
static uint64_t NowNs()
Return nano-seconds since 1970.
static uint64_t NanoSecToLocal(uint64_t ns_since_1970)
Adds the time zone offset to the time stamp.
static std::string NanoSecTzToDDMMYYYY(uint64_t timestamp_ns, int16_t tz_offset_min, int16_t dst_offset_min)
Converts ns since 1970 UTC to a date string in 'DD/MM/YYYY' format in a specified timezone.
static bool ComputerUseLittleEndian()
Returns tru if this computer uses Little Endian.
static std::string Latin1ToUtf8(const std::string &latin1)
Converts a Latin1 string to UTF8 string.
static std::string Utf16ToUtf8(const std::wstring &utf16)
Converts a wide UTF16 string to an UTF8 string.
static std::string NanoSecToDDMMYYYY(uint64_t ns_since_1970)
Converts ns since 1970 UTC to local date DD:MM:YYYY string.
static std::string FormatDouble(double value, uint8_t decimals, bool fixed=false, const std::string &unit={})
Converts a float to a string.
static std::string NsToLocalIsoTime(uint64_t ns_since_1970)
Converts a nanosecond since 1970 to a local ISO date and time string.
static int64_t GmtOffsetNs()
Returns the GMT offset in nanoseconds.
static std::string NanoSecToHHMMSS(uint64_t ns_since_1970)
Converts ns since 1970 UTC to local time HH:MM:SS string.
static int64_t TimeZoneOffset()
return the time zone offset in seconds.
static std::string NanoSecUtcToDDMMYYYY(uint64_t timestamp_ns)
Converts ns since 1970 UTC to UTC date in 'DD/MM/YYYY' format.
static void Trim(std::string &text)
Remove white space from string.
static std::string NanoSecUtcToHHMMSS(uint64_t timestamp_ns)
Converts ns since 1970 UTC to UTC time in 'HH:MM:SS' format.
static int64_t DstOffsetNs()
Returns the daylight saving time (DST) offset in nanoseconds.
static uint64_t CanOpenTimeArrayToNs(const std::vector< uint8_t > &buffer)
Converts from a CANopen 6 byte Time array to nanoseconds since 1970.
static std::wstring Utf8ToUtf16(const std::string &utf8)
Converts a wide UTF8 string to an UTF16 string.
static std::vector< uint8_t > TextToByteArray(const std::string &text)
Converts a text string to a byte array.
static std::string NanoSecTzToHHMMSS(uint64_t timestamp_ns, int16_t tz_offset_min, int16_t dst_offset_min)
Converts ns since 1970 UTC to a time string in 'HH:MM:SS' format in a specified timezone.
static std::vector< uint8_t > NsToCanOpenTimeArray(uint64_t ns_since_1970)
Converts from nanoseconds to CANopen 6 byte Time array.
static std::vector< uint8_t > NsToCanOpenDateArray(uint64_t ns_since_1970)
Converts from nanoseconds to CANopen 7 byte Date array.
Main namespace for the MDF library.
Definition canmessage.h:17