Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
89c7369d
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,发现更多精彩内容 >>
提交
89c7369d
编写于
4月 26, 1999
作者:
T
Tatsuo Ishii
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix from Yutaka Tanida <yutaka@marin.or.jp> for Cygwin32 support.
上级
c84ea433
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
35 addition
and
6 deletion
+35
-6
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datetime.c
+5
-1
src/backend/utils/adt/dt.c
src/backend/utils/adt/dt.c
+19
-3
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/nabstime.c
+11
-2
未找到文件。
src/backend/utils/adt/datetime.c
浏览文件 @
89c7369d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.3
1 1999/04/15 02:22:37 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.3
2 1999/04/26 04:42:48 ishii
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -360,7 +360,11 @@ date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn)
...
@@ -360,7 +360,11 @@ date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn)
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
(
char
*
)
tm
->
tm_zone
;
*
tzn
=
(
char
*
)
tm
->
tm_zone
;
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
#ifdef __CYGWIN__
*
tzp
=
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
tzname
[(
tm
->
tm_isdst
>
0
)];
*
tzn
=
tzname
[(
tm
->
tm_isdst
>
0
)];
#else
#else
...
...
src/backend/utils/adt/dt.c
浏览文件 @
89c7369d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.6
8 1999/04/15 02:22:39 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.6
9 1999/04/26 04:42:48 ishii
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1451,7 +1451,13 @@ datetime_trunc(text *units, DateTime *datetime)
...
@@ -1451,7 +1451,13 @@ datetime_trunc(text *units, DateTime *datetime)
#if defined(HAVE_TM_ZONE)
#if defined(HAVE_TM_ZONE)
tz
=
-
(
tm
->
tm_gmtoff
);
/* tm_gmtoff is Sun/DEC-ism */
tz
=
-
(
tm
->
tm_gmtoff
);
/* tm_gmtoff is Sun/DEC-ism */
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
tz
=
((
tm
->
tm_isdst
>
0
)
?
(
timezone
-
3600
)
:
timezone
);
#ifdef __CYGWIN__
tz
=
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
tz
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
#else
#else
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#endif
...
@@ -2434,7 +2440,11 @@ datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn)
...
@@ -2434,7 +2440,11 @@ datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn)
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
(
char
*
)
tm
->
tm_zone
;
*
tzn
=
(
char
*
)
tm
->
tm_zone
;
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
#ifdef __CYGWIN__
*
tzp
=
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
*
tzn
=
tzname
[(
tm
->
tm_isdst
>
0
)];
*
tzn
=
tzname
[(
tm
->
tm_isdst
>
0
)];
#else
#else
...
@@ -3058,7 +3068,13 @@ DecodeDateTime(char **field, int *ftype, int nf,
...
@@ -3058,7 +3068,13 @@ DecodeDateTime(char **field, int *ftype, int nf,
#if defined(HAVE_TM_ZONE)
#if defined(HAVE_TM_ZONE)
*
tzp
=
-
(
tm
->
tm_gmtoff
);
/* tm_gmtoff is Sun/DEC-ism */
*
tzp
=
-
(
tm
->
tm_gmtoff
);
/* tm_gmtoff is Sun/DEC-ism */
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
*
tzp
=
((
tm
->
tm_isdst
>
0
)
?
(
timezone
-
3600
)
:
timezone
);
#ifdef __CYGWIN__
*
tzp
=
((
tm
->
tm_isdst
>
0
)
?
(
_timezone
-
3600
)
:
_timez
one
);
#else
*
tzp
=
((
tm
->
tm_isdst
>
0
)
?
(
timezone
-
3600
)
:
timezon
e
);
#endif
#else
#else
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#endif
...
...
src/backend/utils/adt/nabstime.c
浏览文件 @
89c7369d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: nabstime.c,v 1.5
3 1999/02/21 03:49:32 scrappy
Exp $
* $Id: nabstime.c,v 1.5
4 1999/04/26 04:42:49 ishii
Exp $
*
*
*/
*/
#include <stdio.h>
#include <stdio.h>
...
@@ -77,7 +77,12 @@ GetCurrentAbsoluteTime(void)
...
@@ -77,7 +77,12 @@ GetCurrentAbsoluteTime(void)
tm
=
localtime
(
&
now
);
tm
=
localtime
(
&
now
);
CDayLight
=
tm
->
tm_isdst
;
CDayLight
=
tm
->
tm_isdst
;
CTimeZone
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
CTimeZone
=
#ifdef __CYGWIN32__
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
strcpy
(
CTZName
,
tzname
[
tm
->
tm_isdst
]);
strcpy
(
CTZName
,
tzname
[
tm
->
tm_isdst
]);
#else
#else
#error USE_POSIX_TIME defined but no time zone available
#error USE_POSIX_TIME defined but no time zone available
...
@@ -167,7 +172,11 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
...
@@ -167,7 +172,11 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
strcpy
(
tzn
,
tm
->
tm_zone
);
strcpy
(
tzn
,
tm
->
tm_zone
);
#elif defined(HAVE_INT_TIMEZONE)
#elif defined(HAVE_INT_TIMEZONE)
if
(
tzp
!=
NULL
)
if
(
tzp
!=
NULL
)
#ifdef __CYGWIN__
*
tzp
=
(
tm
->
tm_isdst
?
(
_timezone
-
3600
)
:
_timezone
);
#else
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
*
tzp
=
(
tm
->
tm_isdst
?
(
timezone
-
3600
)
:
timezone
);
#endif
if
(
tzn
!=
NULL
)
if
(
tzn
!=
NULL
)
strcpy
(
tzn
,
tzname
[
tm
->
tm_isdst
]);
strcpy
(
tzn
,
tzname
[
tm
->
tm_isdst
]);
#else
#else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录