From 2886f35d13877871e0d2da9a4322b9821d71973c Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Wed, 22 Dec 2021 10:41:58 +0800 Subject: [PATCH] [TS-819]: windows negative timestamp error. --- src/kit/shell/src/shellEngine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index b5728bee2d..1863a8c408 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -456,7 +456,7 @@ static char* formatTimestamp(char* buf, int64_t val, int precision) { #ifdef WINDOWS if (tt < 0) { - SYSTEMTIME a={1970,1,5,1,0,0,0,0}; // support 1601-01-01 00:00:00 + SYSTEMTIME a={1970,1,5,1,0,0,0,0}; // SYSTEMTIME struct support 1601-01-01. set 1970 to compatible with Epoch time. FILETIME b; // unit is 100ns ULARGE_INTEGER c; SystemTimeToFileTime(&a,&b); -- GitLab