summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-04-23 13:47:43 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-04-23 13:47:43 +0300
commita82410a3c20ba13969f37d3ab14f6e8ca1067284 (patch)
tree1da9ce420e7867318d42d0ffa46f2eba4cb47883 /include
parent2d6c10c9d420d6e1f00cd2d7649f66728ee3e90f (diff)
common code went to the core utils
Diffstat (limited to 'include')
-rw-r--r--include/m_utils.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/m_utils.h b/include/m_utils.h
index d7dc704085..3ce8b68de3 100644
--- a/include/m_utils.h
+++ b/include/m_utils.h
@@ -435,6 +435,17 @@ EXTERN_C MIR_CORE_DLL(void) Utils_GetRandom(void *pszDest, size_t cbLen);
EXTERN_C MIR_CORE_DLL(bool) Utils_IsRtl(const wchar_t *pszwText);
/////////////////////////////////////////////////////////////////////////////////////////
+// Converts a timestamp in the ISO format to time_t
+
+EXTERN_C MIR_CORE_DLL(time_t) Utils_IsoToUnixTime(const char *pszIsoTimestamp);
+
+#ifdef _XSTRING_
+__forceinline time_t Utils_IsoToUnixTime(const std::string &str) {
+ return Utils_IsoToUnixTime(str.c_str());
+}
+#endif
+
+/////////////////////////////////////////////////////////////////////////////////////////
// UUID generator
MIR_CORE_DLL(CMStringA) Utils_GenerateUUID();