Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c134432c
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c134432c
编写于
4月 06, 2023
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
差异文件
merge main
上级
650dc5ca
79461d91
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
109 addition
and
36 deletion
+109
-36
cmake/cmake.version
cmake/cmake.version
+1
-1
cmake/taostools_CMakeLists.txt.in
cmake/taostools_CMakeLists.txt.in
+1
-1
docs/en/28-releases/01-tdengine.md
docs/en/28-releases/01-tdengine.md
+8
-0
docs/en/28-releases/02-tools.md
docs/en/28-releases/02-tools.md
+4
-0
docs/zh/28-releases/01-tdengine.md
docs/zh/28-releases/01-tdengine.md
+4
-0
docs/zh/28-releases/02-tools.md
docs/zh/28-releases/02-tools.md
+4
-0
include/common/ttime.h
include/common/ttime.h
+1
-1
include/os/osTime.h
include/os/osTime.h
+1
-1
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+3
-1
source/common/src/ttime.c
source/common/src/ttime.c
+16
-8
source/dnode/mgmt/exe/dmMain.c
source/dnode/mgmt/exe/dmMain.c
+16
-1
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+1
-1
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+1
-1
source/libs/function/src/builtins.c
source/libs/function/src/builtins.c
+3
-2
source/libs/scalar/src/sclfunc.c
source/libs/scalar/src/sclfunc.c
+9
-2
source/os/src/osTime.c
source/os/src/osTime.c
+21
-3
source/os/src/osTimezone.c
source/os/src/osTimezone.c
+3
-3
source/util/src/tlog.c
source/util/src/tlog.c
+2
-2
tools/shell/src/shellArguments.c
tools/shell/src/shellArguments.c
+1
-2
tools/shell/src/shellEngine.c
tools/shell/src/shellEngine.c
+1
-2
utils/test/c/tmqDemo.c
utils/test/c/tmqDemo.c
+1
-1
utils/test/c/tmqSim.c
utils/test/c/tmqSim.c
+4
-2
utils/tsim/src/simExe.c
utils/tsim/src/simExe.c
+3
-1
未找到文件。
cmake/cmake.version
浏览文件 @
c134432c
...
...
@@ -2,7 +2,7 @@
IF (DEFINED VERNUMBER)
SET(TD_VER_NUMBER ${VERNUMBER})
ELSE ()
SET(TD_VER_NUMBER "3.0.3.
1
")
SET(TD_VER_NUMBER "3.0.3.
2
")
ENDIF ()
IF (DEFINED VERCOMPATIBLE)
...
...
cmake/taostools_CMakeLists.txt.in
浏览文件 @
c134432c
...
...
@@ -2,7 +2,7 @@
# taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_TAG
273a3fe
GIT_TAG
ddd654a
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
...
...
docs/en/28-releases/01-tdengine.md
浏览文件 @
c134432c
...
...
@@ -10,6 +10,14 @@ For TDengine 2.x installation packages by version, please visit [here](https://w
import Release from "/components/ReleaseV3";
## 3.0.3.2
<Release
type=
"tdengine"
version=
"3.0.3.2"
/>
## 3.0.3.1
<Release
type=
"tdengine"
version=
"3.0.3.1"
/>
## 3.0.3.1
<Release
type=
"tdengine"
version=
"3.0.3.1"
/>
...
...
docs/en/28-releases/02-tools.md
浏览文件 @
c134432c
...
...
@@ -10,6 +10,10 @@ For other historical version installers, please visit [here](https://www.taosdat
import Release from "/components/ReleaseV3";
## 2.4.11
<Release
type=
"tools"
version=
"2.4.11"
/>
## 2.4.10
<Release
type=
"tools"
version=
"2.4.10"
/>
...
...
docs/zh/28-releases/01-tdengine.md
浏览文件 @
c134432c
...
...
@@ -10,6 +10,10 @@ TDengine 2.x 各版本安装包请访问[这里](https://www.taosdata.com/all-do
import Release from "/components/ReleaseV3";
## 3.0.3.2
<Release
type=
"tdengine"
version=
"3.0.3.2"
/>
## 3.0.3.1
<Release
type=
"tdengine"
version=
"3.0.3.1"
/>
...
...
docs/zh/28-releases/02-tools.md
浏览文件 @
c134432c
...
...
@@ -10,6 +10,10 @@ taosTools 各版本安装包下载链接如下:
import Release from "/components/ReleaseV3";
## 2.4.11
<Release
type=
"tools"
version=
"2.4.11"
/>
## 2.4.10
<Release
type=
"tools"
version=
"2.4.10"
/>
...
...
include/common/ttime.h
浏览文件 @
c134432c
...
...
@@ -64,7 +64,7 @@ static FORCE_INLINE int64_t taosGetTimestampToday(int32_t precision) {
:
1000000000
;
time_t
t
=
taosTime
(
NULL
);
struct
tm
tm
;
taosLocalTime
(
&
t
,
&
tm
);
taosLocalTime
(
&
t
,
&
tm
,
NULL
);
tm
.
tm_hour
=
0
;
tm
.
tm_min
=
0
;
tm
.
tm_sec
=
0
;
...
...
include/os/osTime.h
浏览文件 @
c134432c
...
...
@@ -91,7 +91,7 @@ static FORCE_INLINE int64_t taosGetMonoTimestampMs() {
}
char
*
taosStrpTime
(
const
char
*
buf
,
const
char
*
fmt
,
struct
tm
*
tm
);
struct
tm
*
taosLocalTime
(
const
time_t
*
timep
,
struct
tm
*
result
);
struct
tm
*
taosLocalTime
(
const
time_t
*
timep
,
struct
tm
*
result
,
char
*
buf
);
struct
tm
*
taosLocalTimeNolock
(
struct
tm
*
result
,
const
time_t
*
timep
,
int
dst
);
time_t
taosTime
(
time_t
*
t
);
time_t
taosMktime
(
struct
tm
*
timep
);
...
...
source/common/src/tdatablock.c
浏览文件 @
c134432c
...
...
@@ -1836,7 +1836,9 @@ static char* formatTimestamp(char* buf, int64_t val, int precision) {
}
}
struct
tm
ptm
=
{
0
};
taosLocalTime
(
&
tt
,
&
ptm
);
if
(
taosLocalTime
(
&
tt
,
&
ptm
,
buf
)
==
NULL
)
{
return
buf
;
}
size_t
pos
=
strftime
(
buf
,
35
,
"%Y-%m-%d %H:%M:%S"
,
&
ptm
);
if
(
precision
==
TSDB_TIME_PRECISION_NANO
)
{
...
...
source/common/src/ttime.c
浏览文件 @
c134432c
...
...
@@ -727,7 +727,7 @@ int64_t taosTimeAdd(int64_t t, int64_t duration, char unit, int32_t precision) {
struct
tm
tm
;
time_t
tt
=
(
time_t
)(
t
/
TSDB_TICK_PER_SECOND
(
precision
));
taosLocalTime
(
&
tt
,
&
tm
);
taosLocalTime
(
&
tt
,
&
tm
,
NULL
);
int32_t
mon
=
tm
.
tm_year
*
12
+
tm
.
tm_mon
+
(
int32_t
)
numOfMonth
;
tm
.
tm_year
=
mon
/
12
;
tm
.
tm_mon
=
mon
%
12
;
...
...
@@ -750,11 +750,11 @@ int32_t taosTimeCountInterval(int64_t skey, int64_t ekey, int64_t interval, char
struct
tm
tm
;
time_t
t
=
(
time_t
)
skey
;
taosLocalTime
(
&
t
,
&
tm
);
taosLocalTime
(
&
t
,
&
tm
,
NULL
);
int32_t
smon
=
tm
.
tm_year
*
12
+
tm
.
tm_mon
;
t
=
(
time_t
)
ekey
;
taosLocalTime
(
&
t
,
&
tm
);
taosLocalTime
(
&
t
,
&
tm
,
NULL
);
int32_t
emon
=
tm
.
tm_year
*
12
+
tm
.
tm_mon
;
if
(
unit
==
'y'
)
{
...
...
@@ -774,7 +774,7 @@ int64_t taosTimeTruncate(int64_t t, const SInterval* pInterval, int32_t precisio
start
/=
(
int64_t
)(
TSDB_TICK_PER_SECOND
(
precision
));
struct
tm
tm
;
time_t
tt
=
(
time_t
)
start
;
taosLocalTime
(
&
tt
,
&
tm
);
taosLocalTime
(
&
tt
,
&
tm
,
NULL
);
tm
.
tm_sec
=
0
;
tm
.
tm_min
=
0
;
tm
.
tm_hour
=
0
;
...
...
@@ -867,13 +867,17 @@ const char* fmtts(int64_t ts) {
if
(
ts
>
-
62135625943
&&
ts
<
32503651200
)
{
time_t
t
=
(
time_t
)
ts
;
taosLocalTime
(
&
t
,
&
tm
);
if
(
taosLocalTime
(
&
t
,
&
tm
,
buf
)
==
NULL
)
{
return
buf
;
}
pos
+=
strftime
(
buf
+
pos
,
sizeof
(
buf
),
"s=%Y-%m-%d %H:%M:%S"
,
&
tm
);
}
if
(
ts
>
-
62135625943000
&&
ts
<
32503651200000
)
{
time_t
t
=
(
time_t
)(
ts
/
1000
);
taosLocalTime
(
&
t
,
&
tm
);
if
(
taosLocalTime
(
&
t
,
&
tm
,
buf
)
==
NULL
)
{
return
buf
;
}
if
(
pos
>
0
)
{
buf
[
pos
++
]
=
' '
;
buf
[
pos
++
]
=
'|'
;
...
...
@@ -885,7 +889,9 @@ const char* fmtts(int64_t ts) {
{
time_t
t
=
(
time_t
)(
ts
/
1000000
);
taosLocalTime
(
&
t
,
&
tm
);
if
(
taosLocalTime
(
&
t
,
&
tm
,
buf
)
==
NULL
)
{
return
buf
;
}
if
(
pos
>
0
)
{
buf
[
pos
++
]
=
' '
;
buf
[
pos
++
]
=
'|'
;
...
...
@@ -937,7 +943,9 @@ void taosFormatUtcTime(char* buf, int32_t bufLen, int64_t t, int32_t precision)
ASSERT
(
false
);
}
taosLocalTime
(
&
quot
,
&
ptm
);
if
(
taosLocalTime
(
&
quot
,
&
ptm
,
buf
)
==
NULL
)
{
return
;
}
int32_t
length
=
(
int32_t
)
strftime
(
ts
,
40
,
"%Y-%m-%dT%H:%M:%S"
,
&
ptm
);
length
+=
snprintf
(
ts
+
length
,
fractionLen
,
format
,
mod
);
length
+=
(
int32_t
)
strftime
(
ts
+
length
,
40
-
length
,
"%z"
,
&
ptm
);
...
...
source/dnode/mgmt/exe/dmMain.c
浏览文件 @
c134432c
...
...
@@ -20,6 +20,21 @@
#include "tglobal.h"
#include "version.h"
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
#include "cus_name.h"
#else
#ifndef CUS_NAME
#define CUS_NAME "TDengine"
#endif
#ifndef CUS_PROMPT
#define CUS_PROMPT "taos"
#endif
#ifndef CUS_EMAIL
#define CUS_EMAIL "<support@taosdata.com>"
#endif
#endif
// clang-format off
#define DM_APOLLO_URL "The apollo string to use when configuring the server, such as: -a 'jsonFile:./tests/cfg.json', cfg.json text can be '{\"fqdn\":\"td1\"}'."
#define DM_CFG_DIR "Configuration directory."
...
...
@@ -232,7 +247,7 @@ static void dmDumpCfg() {
}
static
int32_t
dmInitLog
()
{
return
taosCreateLog
(
"taos
dlog"
,
1
,
configDir
,
global
.
envCmd
,
global
.
envFile
,
global
.
apolloUrl
,
global
.
pArgs
,
0
);
return
taosCreateLog
(
CUS_PROMPT
"
dlog"
,
1
,
configDir
,
global
.
envCmd
,
global
.
envFile
,
global
.
apolloUrl
,
global
.
pArgs
,
0
);
}
static
void
taosCleanupArgs
()
{
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
c134432c
...
...
@@ -90,7 +90,7 @@ static void getNextTimeWindow(SInterval* pInterval, STimeWindow* tw, int32_t ord
struct
tm
tm
;
time_t
t
=
(
time_t
)
key
;
taosLocalTime
(
&
t
,
&
tm
);
taosLocalTime
(
&
t
,
&
tm
,
NULL
);
int
mon
=
(
int
)(
tm
.
tm_year
*
12
+
tm
.
tm_mon
+
interval
*
factor
);
tm
.
tm_year
=
mon
/
12
;
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
c134432c
...
...
@@ -283,7 +283,7 @@ static void getNextTimeWindow(SInterval* pInterval, int32_t precision, int32_t o
struct
tm
tm
;
time_t
t
=
(
time_t
)
key
;
taosLocalTime
(
&
t
,
&
tm
);
taosLocalTime
(
&
t
,
&
tm
,
NULL
);
int
mon
=
(
int
)(
tm
.
tm_year
*
12
+
tm
.
tm_mon
+
interval
*
factor
);
tm
.
tm_year
=
mon
/
12
;
...
...
source/libs/function/src/builtins.c
浏览文件 @
c134432c
...
...
@@ -213,8 +213,9 @@ static int32_t addTimezoneParam(SNodeList* pList) {
char
buf
[
6
]
=
{
0
};
time_t
t
=
taosTime
(
NULL
);
struct
tm
tmInfo
;
taosLocalTime
(
&
t
,
&
tmInfo
);
strftime
(
buf
,
sizeof
(
buf
),
"%z"
,
&
tmInfo
);
if
(
taosLocalTime
(
&
t
,
&
tmInfo
,
buf
)
!=
NULL
)
{
strftime
(
buf
,
sizeof
(
buf
),
"%z"
,
&
tmInfo
);
}
int32_t
len
=
(
int32_t
)
strlen
(
buf
);
SValueNode
*
pVal
=
(
SValueNode
*
)
nodesMakeNode
(
QUERY_NODE_VALUE
);
...
...
source/libs/scalar/src/sclfunc.c
浏览文件 @
c134432c
...
...
@@ -1067,9 +1067,15 @@ int32_t toISO8601Function(SScalarParam *pInput, int32_t inputNum, SScalarParam *
}
struct
tm
tmInfo
;
taosLocalTime
((
const
time_t
*
)
&
timeVal
,
&
tmInfo
);
int32_t
len
=
0
;
if
(
taosLocalTime
((
const
time_t
*
)
&
timeVal
,
&
tmInfo
,
buf
)
==
NULL
)
{
len
=
(
int32_t
)
strlen
(
buf
);
goto
_end
;
}
strftime
(
buf
,
sizeof
(
buf
),
"%Y-%m-%dT%H:%M:%S"
,
&
tmInfo
);
int32_t
len
=
(
int32_t
)
strlen
(
buf
);
len
=
(
int32_t
)
strlen
(
buf
);
// add timezone string
if
(
tzLen
>
0
)
{
...
...
@@ -1103,6 +1109,7 @@ int32_t toISO8601Function(SScalarParam *pInput, int32_t inputNum, SScalarParam *
len
+=
fracLen
;
}
_end:
memmove
(
buf
+
VARSTR_HEADER_SIZE
,
buf
,
len
);
varDataSetLen
(
buf
,
len
);
...
...
source/os/src/osTime.c
浏览文件 @
c134432c
...
...
@@ -407,12 +407,21 @@ time_t taosMktime(struct tm *timep) {
#endif
}
struct
tm
*
taosLocalTime
(
const
time_t
*
timep
,
struct
tm
*
result
)
{
struct
tm
*
taosLocalTime
(
const
time_t
*
timep
,
struct
tm
*
result
,
char
*
buf
)
{
struct
tm
*
res
=
NULL
;
if
(
result
==
NULL
)
{
return
localtime
(
timep
);
res
=
localtime
(
timep
);
if
(
res
==
NULL
&&
buf
!=
NULL
)
{
sprintf
(
buf
,
"NaN"
);
}
return
res
;
}
#ifdef WINDOWS
if
(
*
timep
<
0
)
{
if
(
buf
!=
NULL
)
{
sprintf
(
buf
,
"NaN"
);
}
return
NULL
;
// TODO: bugs in following code
SYSTEMTIME
ss
,
s
;
...
...
@@ -421,6 +430,9 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) {
struct
tm
tm1
;
time_t
tt
=
0
;
if
(
localtime_s
(
&
tm1
,
&
tt
)
!=
0
)
{
if
(
buf
!=
NULL
)
{
sprintf
(
buf
,
"NaN"
);
}
return
NULL
;
}
ss
.
wYear
=
tm1
.
tm_year
+
1900
;
...
...
@@ -449,11 +461,17 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) {
result
->
tm_isdst
=
0
;
}
else
{
if
(
localtime_s
(
result
,
timep
)
!=
0
)
{
if
(
buf
!=
NULL
)
{
sprintf
(
buf
,
"NaN"
);
}
return
NULL
;
}
}
#else
localtime_r
(
timep
,
result
);
res
=
localtime_r
(
timep
,
result
);
if
(
res
==
NULL
&&
buf
!=
NULL
)
{
sprintf
(
buf
,
"NaN"
);
}
#endif
return
result
;
}
...
...
source/os/src/osTimezone.c
浏览文件 @
c134432c
...
...
@@ -893,7 +893,7 @@ void taosGetSystemTimezone(char *outTimezoneStr, enum TdTimezone *tsTimezone) {
*/
time_t
tx1
=
taosGetTimestampSec
();
struct
tm
tm1
;
taosLocalTime
(
&
tx1
,
&
tm1
);
taosLocalTime
(
&
tx1
,
&
tm1
,
NULL
);
daylight
=
tm1
.
tm_isdst
;
/*
...
...
@@ -921,7 +921,7 @@ void taosGetSystemTimezone(char *outTimezoneStr, enum TdTimezone *tsTimezone) {
*/
time_t
tx1
=
taosGetTimestampSec
();
struct
tm
tm1
;
taosLocalTime
(
&
tx1
,
&
tm1
);
taosLocalTime
(
&
tx1
,
&
tm1
,
NULL
);
/* load time zone string from /etc/timezone */
// FILE *f = fopen("/etc/timezone", "r");
errno
=
0
;
...
...
@@ -1008,7 +1008,7 @@ void taosGetSystemTimezone(char *outTimezoneStr, enum TdTimezone *tsTimezone) {
*/
time_t
tx1
=
taosGetTimestampSec
();
struct
tm
tm1
;
taosLocalTime
(
&
tx1
,
&
tm1
);
taosLocalTime
(
&
tx1
,
&
tm1
,
NULL
);
/*
* format example:
...
...
source/util/src/tlog.c
浏览文件 @
c134432c
...
...
@@ -121,7 +121,7 @@ static FORCE_INLINE void taosUpdateDaylight() {
struct
timeval
timeSecs
;
taosGetTimeOfDay
(
&
timeSecs
);
time_t
curTime
=
timeSecs
.
tv_sec
;
ptm
=
taosLocalTime
(
&
curTime
,
&
Tm
);
ptm
=
taosLocalTime
(
&
curTime
,
&
Tm
,
NULL
);
tsDaylightActive
=
ptm
->
tm_isdst
;
}
static
FORCE_INLINE
int32_t
taosGetDaylight
()
{
return
tsDaylightActive
;
}
...
...
@@ -437,7 +437,7 @@ static inline int32_t taosBuildLogHead(char *buffer, const char *flags) {
taosGetTimeOfDay
(
&
timeSecs
);
time_t
curTime
=
timeSecs
.
tv_sec
;
ptm
=
taosLocalTime
(
&
curTime
,
&
Tm
);
ptm
=
taosLocalTime
(
&
curTime
,
&
Tm
,
NULL
);
return
sprintf
(
buffer
,
"%02d/%02d %02d:%02d:%02d.%06d %08"
PRId64
" %s"
,
ptm
->
tm_mon
+
1
,
ptm
->
tm_mday
,
ptm
->
tm_hour
,
ptm
->
tm_min
,
ptm
->
tm_sec
,
(
int32_t
)
timeSecs
.
tv_usec
,
taosGetSelfPthreadId
(),
flags
);
...
...
tools/shell/src/shellArguments.c
浏览文件 @
c134432c
...
...
@@ -59,8 +59,7 @@ char cusEmail[] = "<support@taosdata.com>";
#define SHELL_VERSION "Print program version."
#ifdef WEBSOCKET
#define SHELL_DSN \
"Use dsn to connect to the TDengine cloud server or to a remote server which provides WebSocket connection."
#define SHELL_DSN "Use dsn to connect to the cloud server or to a remote server which provides WebSocket connection."
#define SHELL_REST "Use RESTful mode when connecting."
#define SHELL_TIMEOUT "Set the timeout for websocket query in seconds, default is 30."
#endif
...
...
tools/shell/src/shellEngine.c
浏览文件 @
c134432c
...
...
@@ -291,8 +291,7 @@ char *shellFormatTimestamp(char *buf, int64_t val, int32_t precision) {
}
struct
tm
ptm
=
{
0
};
if
(
taosLocalTime
(
&
tt
,
&
ptm
)
==
NULL
)
{
sprintf
(
buf
,
"NaN"
);
if
(
taosLocalTime
(
&
tt
,
&
ptm
,
buf
)
==
NULL
)
{
return
buf
;
}
size_t
pos
=
strftime
(
buf
,
35
,
"%Y-%m-%d %H:%M:%S"
,
&
ptm
);
...
...
utils/test/c/tmqDemo.c
浏览文件 @
c134432c
...
...
@@ -597,7 +597,7 @@ void printParaIntoFile() {
time_t
tTime
=
taosGetTimestampSec
();
struct
tm
tm
;
taosLocalTime
(
&
tTime
,
&
tm
);
taosLocalTime
(
&
tTime
,
&
tm
,
NULL
);
taosFprintfFile
(
pFile
,
"###################################################################
\n
"
);
taosFprintfFile
(
pFile
,
"# configDir: %s
\n
"
,
configDir
);
...
...
utils/test/c/tmqSim.c
浏览文件 @
c134432c
...
...
@@ -166,7 +166,7 @@ static void printHelp() {
char
*
getCurrentTimeString
(
char
*
timeString
)
{
time_t
tTime
=
taosGetTimestampSec
();
struct
tm
tm
;
taosLocalTime
(
&
tTime
,
&
tm
);
taosLocalTime
(
&
tTime
,
&
tm
,
NULL
);
sprintf
(
timeString
,
"%d-%02d-%02d %02d:%02d:%02d"
,
tm
.
tm_year
+
1900
,
tm
.
tm_mon
+
1
,
tm
.
tm_mday
,
tm
.
tm_hour
,
tm
.
tm_min
,
tm
.
tm_sec
);
...
...
@@ -472,7 +472,9 @@ static char* shellFormatTimestamp(char* buf, int64_t val, int32_t precision) {
}
struct
tm
ptm
;
taosLocalTime
(
&
tt
,
&
ptm
);
if
(
taosLocalTime
(
&
tt
,
&
ptm
,
buf
)
==
NULL
)
{
return
buf
;
}
size_t
pos
=
strftime
(
buf
,
35
,
"%Y-%m-%d %H:%M:%S"
,
&
ptm
);
if
(
precision
==
TSDB_TIME_PRECISION_NANO
)
{
...
...
utils/tsim/src/simExe.c
浏览文件 @
c134432c
...
...
@@ -772,7 +772,9 @@ bool simExecuteNativeSqlCommand(SScript *script, char *rest, bool isSlow) {
tt
=
(
*
(
int64_t
*
)
row
[
i
])
/
1000000000
;
}
taosLocalTime
(
&
tt
,
&
tp
);
if
(
taosLocalTime
(
&
tt
,
&
tp
,
timeStr
)
==
NULL
)
{
break
;
}
strftime
(
timeStr
,
64
,
"%y-%m-%d %H:%M:%S"
,
&
tp
);
if
(
precision
==
TSDB_TIME_PRECISION_MILLI
)
{
sprintf
(
value
,
"%s.%03d"
,
timeStr
,
(
int32_t
)(
*
((
int64_t
*
)
row
[
i
])
%
1000
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录