Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
87581343
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
87581343
编写于
5月 21, 2005
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove excess parens, use Abs instead of : ?.
上级
2e9c04ee
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
8 deletion
+8
-8
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datetime.c
+8
-8
未找到文件。
src/backend/utils/adt/datetime.c
浏览文件 @
87581343
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.1
39 2005/04/20 17:14:50 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.1
40 2005/05/21 03:38:05 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1551,7 +1551,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
return
DTERR_FIELD_OVERFLOW
;
/* timezone not specified? then find local timezone if possible */
if
(
(
tzp
!=
NULL
)
&&
(
!
(
fmask
&
DTK_M
(
TZ
)
)))
if
(
tzp
!=
NULL
&&
!
(
fmask
&
DTK_M
(
TZ
)))
{
/*
* daylight savings time modifier but no standard timezone?
...
...
@@ -2205,7 +2205,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
return
DTERR_BAD_FORMAT
;
/* timezone not specified? then find local timezone if possible */
if
(
(
tzp
!=
NULL
)
&&
(
!
(
fmask
&
DTK_M
(
TZ
)
)))
if
(
tzp
!=
NULL
&&
!
(
fmask
&
DTK_M
(
TZ
)))
{
struct
pg_tm
tt
,
*
tmp
=
&
tt
;
...
...
@@ -3533,7 +3533,7 @@ EncodeDateTime(struct pg_tm * tm, fsec_t fsec, int *tzp, char **tzn, int style,
* have alpha time zone info available. tm_isdst != -1
* indicates that we have a valid time zone translation.
*/
if
(
(
tzp
!=
NULL
)
&&
(
tm
->
tm_isdst
>=
0
)
)
if
(
tzp
!=
NULL
&&
tm
->
tm_isdst
>=
0
)
{
hour
=
-
(
*
tzp
/
3600
);
min
=
((
abs
(
*
tzp
)
/
60
)
%
60
);
...
...
@@ -3579,7 +3579,7 @@ EncodeDateTime(struct pg_tm * tm, fsec_t fsec, int *tzp, char **tzn, int style,
else
sprintf
((
str
+
strlen
(
str
)),
":%02d"
,
tm
->
tm_sec
);
if
(
(
tzp
!=
NULL
)
&&
(
tm
->
tm_isdst
>=
0
)
)
if
(
tzp
!=
NULL
&&
tm
->
tm_isdst
>=
0
)
{
if
(
*
tzn
!=
NULL
)
sprintf
((
str
+
strlen
(
str
)),
" %.*s"
,
MAXTZLEN
,
*
tzn
);
...
...
@@ -3627,7 +3627,7 @@ EncodeDateTime(struct pg_tm * tm, fsec_t fsec, int *tzp, char **tzn, int style,
else
sprintf
((
str
+
strlen
(
str
)),
":%02d"
,
tm
->
tm_sec
);
if
(
(
tzp
!=
NULL
)
&&
(
tm
->
tm_isdst
>=
0
)
)
if
(
tzp
!=
NULL
&&
tm
->
tm_isdst
>=
0
)
{
if
(
*
tzn
!=
NULL
)
sprintf
((
str
+
strlen
(
str
)),
" %.*s"
,
MAXTZLEN
,
*
tzn
);
...
...
@@ -3686,7 +3686,7 @@ EncodeDateTime(struct pg_tm * tm, fsec_t fsec, int *tzp, char **tzn, int style,
sprintf
((
str
+
strlen
(
str
)),
" %04d"
,
((
tm
->
tm_year
>
0
)
?
tm
->
tm_year
:
-
(
tm
->
tm_year
-
1
)));
if
(
(
tzp
!=
NULL
)
&&
(
tm
->
tm_isdst
>=
0
)
)
if
(
tzp
!=
NULL
&&
tm
->
tm_isdst
>=
0
)
{
if
(
*
tzn
!=
NULL
)
sprintf
((
str
+
strlen
(
str
)),
" %.*s"
,
MAXTZLEN
,
*
tzn
);
...
...
@@ -3787,7 +3787,7 @@ EncodeInterval(struct pg_tm * tm, fsec_t fsec, int style, char *str)
#ifdef HAVE_INT64_TIMESTAMP
sprintf
(
cp
,
":%02d"
,
abs
(
tm
->
tm_sec
));
cp
+=
strlen
(
cp
);
sprintf
(
cp
,
".%06d"
,
((
fsec
>=
0
)
?
fsec
:
-
(
fsec
)
));
sprintf
(
cp
,
".%06d"
,
Abs
(
fsec
));
#else
fsec
+=
tm
->
tm_sec
;
sprintf
(
cp
,
":%013.10f"
,
fabs
(
fsec
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录