From 7cc5a3badbc830c5783da61afa8de0028a62b358 Mon Sep 17 00:00:00 2001 From: scinorandex Date: Tue, 15 Mar 2022 20:59:14 +0800 Subject: [PATCH] fix: improper conversion of iso8601 date to unix timestamp --- cog-utils/cog-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cog-utils/cog-utils.c b/cog-utils/cog-utils.c index 024b0d00e..3b7feeb0e 100644 --- a/cog-utils/cog-utils.c +++ b/cog-utils/cog-utils.c @@ -96,7 +96,7 @@ cog_iso8601_to_unix_ms(const char str[], size_t len, uint64_t *p_value) tm.tm_year -= 1900; /* struct tm takes years from 1900 */ *p_value = (((uint64_t)mktime(&tm) + cog_timezone()) * 1000) - + (uint64_t)seconds * 1000.0; + + (uint64_t)(seconds * 1000.0); switch (tz_operator) { case '+': /* Add hours and minutes */