Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSulad
提交
6eaabf3f
I
iSulad
项目概览
openeuler
/
iSulad
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
iSulad
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6eaabf3f
编写于
3月 12, 2020
作者:
O
openeuler-ci-bot
提交者:
Gitee
3月 12, 2020
浏览文件
操作
浏览文件
下载
差异文件
!102 iSulad: set tm_isdst to -1 to let system decide dst
Merge pull request !102 from lifeng_isula/fix_time
上级
a452055f
5de8d5ac
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
1 deletion
+12
-1
src/engines/lcr/lcr_engine.c
src/engines/lcr/lcr_engine.c
+1
-1
src/types_def.c
src/types_def.c
+11
-0
未找到文件。
src/engines/lcr/lcr_engine.c
浏览文件 @
6eaabf3f
...
...
@@ -262,7 +262,7 @@ struct engine_operation *lcr_engine_init()
{
void
*
lcr_handler
=
NULL
;
struct
engine_operation
*
eop
=
NULL
;
lcr_handler
=
dlopen
(
"liblcr.so"
,
RTLD_NOW
|
RTLD_DEEPBIND
);
lcr_handler
=
dlopen
(
"liblcr.so"
,
RTLD_NOW
);
if
(
lcr_handler
==
NULL
)
{
ERROR
(
"Plugin error: %s"
,
dlerror
());
return
NULL
;
...
...
src/types_def.c
浏览文件 @
6eaabf3f
...
...
@@ -116,6 +116,9 @@ bool get_timestamp(const char *str_time, types_timestamp_t *timestamp)
return
false
;
}
// set tm_isdst be kept as -1 to let the system decide if its dst or not
tm_day
.
tm_isdst
=
-
1
;
seconds
=
(
int64_t
)
mktime
(
&
tm_day
);
timestamp
->
has_seconds
=
true
;
timestamp
->
seconds
=
seconds
;
...
...
@@ -559,7 +562,11 @@ static int64_t get_minmus_time(struct tm *tm1, struct tm *tm2)
return
-
1
;
}
// set tm_isdst be kept as -1 to let the system decide if its dst or not
tm1
->
tm_isdst
=
-
1
;
tmseconds1
=
(
int64_t
)
mktime
(
tm1
);
// set tm_isdst be kept as -1 to let the system decide if its dst or not
tm2
->
tm_isdst
=
-
1
;
tmseconds2
=
(
int64_t
)
mktime
(
tm2
);
result
=
tmseconds1
-
tmseconds2
;
return
result
;
...
...
@@ -911,6 +918,10 @@ int to_unix_nanos_from_str(const char *str, int64_t *nanos)
ERROR
(
"Transform str to timestamp failed"
);
return
-
1
;
}
// set tm_isdst be kept as -1 to let the system decide if its dst or not
tm
.
tm_isdst
=
-
1
;
*
nanos
=
mktime
(
&
tm
)
*
Time_Second
+
nano
;
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录