diff options
| author | Bruce Momjian <bruce@momjian.us> | 2004-09-09 00:24:12 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2004-09-09 00:24:12 +0000 |
| commit | b70999d0fd9a43288842f27b10cf317144ac9ff1 (patch) | |
| tree | 0de17415de03f2fbe091f703b0888555ce50f412 /src/interfaces/ecpg | |
| parent | f62901ca810fe3c030b80adae1dbf8cf95d3db6c (diff) | |
Make TZNAME_GLOBAL for reference to tzname global variable.
Diffstat (limited to 'src/interfaces/ecpg')
| -rw-r--r-- | src/interfaces/ecpg/pgtypeslib/dt_common.c | 4 | ||||
| -rw-r--r-- | src/interfaces/ecpg/pgtypeslib/timestamp.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c index f906b449b08..ad9c8b05c30 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c @@ -1065,8 +1065,8 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn) * case it contains an error message, which doesn't fit in the * buffer */ - StrNCpy(*tzn, tzname[tm->tm_isdst], MAXTZLEN + 1); - if (strlen(tzname[tm->tm_isdst]) > MAXTZLEN) + StrNCpy(*tzn, TZNAME_GLOBAL[tm->tm_isdst], MAXTZLEN + 1); + if (strlen(TZNAME_GLOBAL[tm->tm_isdst]) > MAXTZLEN) tm->tm_isdst = -1; } } diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c index fc168170396..9f4bf782cd0 100644 --- a/src/interfaces/ecpg/pgtypeslib/timestamp.c +++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c @@ -223,7 +223,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn) #elif defined(HAVE_INT_TIMEZONE) *tzp = ((tm->tm_isdst > 0) ? (TIMEZONE_GLOBAL - 3600) : TIMEZONE_GLOBAL); if (tzn != NULL) - *tzn = tzname[(tm->tm_isdst > 0)]; + *tzn = TZNAME_GLOBAL[(tm->tm_isdst > 0)]; #endif #else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */ |
