diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index a6f5869936beb7e5d9a17d0ff9ecc9fbd499db2f..e86a1fce60a3ea6eda5ddccd309df9f89a32e6a6 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -412,7 +412,7 @@ static char* formatTimestamp(char* buf, int64_t val, int precision) { #ifdef WINDOWS if (tt < 0) tt = 0; #endif - if (tt < 0 && ms != 0) { + if (tt <= 0 && ms < 0) { tt--; if (precision == TSDB_TIME_PRECISION_MICRO) { ms += 1000000;