diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-11-12 00:39:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-11-12 00:39:36 +0000 |
commit | 400013ceecb27c9582a6d9e8d48930a47d0b7a85 (patch) | |
tree | daaaa8360e708e8302ff7d027a10a68c13dfc058 | |
parent | 4d3fb9ce6e1c85964335d7b4942dc0e8080c9ce5 (diff) | |
download | postgresql-400013ceecb27c9582a6d9e8d48930a47d0b7a85.tar.gz postgresql-400013ceecb27c9582a6d9e8d48930a47d0b7a85.zip |
Remove NO_MKTIME_BEFORE_1970. I had speculated that it was not needed
anymore given the mktime() workaround now done in DetermineLocalTimeZone.
This has now been confirmed by Robert Bruccoleri for Irix, and I'm going
to extrapolate to AIX as well.
-rw-r--r-- | src/backend/utils/adt/nabstime.c | 14 | ||||
-rw-r--r-- | src/backend/utils/adt/timestamp.c | 10 | ||||
-rw-r--r-- | src/include/port/aix.h | 2 | ||||
-rw-r--r-- | src/include/port/irix5.h | 2 | ||||
-rw-r--r-- | src/test/regress/resultmap | 4 |
5 files changed, 7 insertions, 25 deletions
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index ae929c76ec2..0e57ec72a28 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.100 2002/10/04 17:34:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.100.2.1 2002/11/12 00:39:36 tgl Exp $ * * NOTES * @@ -289,21 +289,9 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn) #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) if ((!HasCTZSet) && (tzp != NULL)) - { tx = localtime((time_t *) &time); -#ifdef NO_MKTIME_BEFORE_1970 - if (tx->tm_year < 70 && tx->tm_isdst == 1) - { - time -= 3600; - tx = localtime((time_t *) &time); - tx->tm_isdst = 0; - } -#endif - } else - { tx = gmtime((time_t *) &time); - }; tm->tm_year = tx->tm_year + 1900; tm->tm_mon = tx->tm_mon + 1; diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 2c8f882e384..2fe99308c05 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.74 2002/09/21 19:52:41 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.74.2.1 2002/11/12 00:39:36 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -906,14 +906,6 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn) #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) tx = localtime(&utime); -#ifdef NO_MKTIME_BEFORE_1970 - if (tx->tm_year < 70 && tx->tm_isdst == 1) - { - utime -= 3600; - tx = localtime(&utime); - tx->tm_isdst = 0; - } -#endif tm->tm_year = tx->tm_year + 1900; tm->tm_mon = tx->tm_mon + 1; tm->tm_mday = tx->tm_mday; diff --git a/src/include/port/aix.h b/src/include/port/aix.h index 5e4f70a7900..d68b261afb3 100644 --- a/src/include/port/aix.h +++ b/src/include/port/aix.h @@ -1,7 +1,7 @@ #define CLASS_CONFLICT #define DISABLE_XOPEN_NLS #define HAS_TEST_AND_SET -#define NO_MKTIME_BEFORE_1970 + typedef unsigned int slock_t; #include <sys/machine.h> /* ENDIAN definitions for network diff --git a/src/include/port/irix5.h b/src/include/port/irix5.h index ff91fc29227..aec62c87c25 100644 --- a/src/include/port/irix5.h +++ b/src/include/port/irix5.h @@ -1,3 +1,3 @@ #define HAS_TEST_AND_SET -#define NO_MKTIME_BEFORE_1970 + typedef unsigned long slock_t; diff --git a/src/test/regress/resultmap b/src/test/regress/resultmap index d4e6e91f9f4..728e4c28332 100644 --- a/src/test/regress/resultmap +++ b/src/test/regress/resultmap @@ -1,4 +1,5 @@ abstime/alpha.*-dec-osf=abstime-solaris-1947 +abstime/.*-irix=abstime-solaris-1947 abstime/i.86-pc-solaris=abstime-solaris-1947 abstime/sparc-sun-solaris=abstime-solaris-1947 abstime/.*-sco=abstime-solaris-1947 @@ -38,10 +39,10 @@ geometry/alpha.*-linux-gnu=geometry-solaris-precision geometry/.*-beos=geometry-intel-beos horology/.*-aix4=horology-no-DST-before-1970 horology/.*-aix5=horology-no-DST-before-1970 -horology/.*-irix6=horology-no-DST-before-1970 horology/alpha.*-dec-osf=horology-solaris-1947 horology/.*-cygwin=horology-no-DST-before-1970 horology/hppa=horology-no-DST-before-1970 +horology/.*-irix=horology-solaris-1947 horology/i.86-pc-solaris=horology-solaris-1947 horology/sparc-sun-solaris=horology-solaris-1947 horology/sparc-sun-sunos4.*=horology-no-DST-before-1970 @@ -49,6 +50,7 @@ horology/.*-sysv5=horology-solaris-1947 horology/.*-sco=horology-solaris-1947 int8/.*-qnx=int8-exp-three-digits tinterval/alpha.*-dec-osf=tinterval-solaris-1947 +tinterval/.*-irix=tinterval-solaris-1947 tinterval/i.86-pc-solaris=tinterval-solaris-1947 tinterval/sparc-sun-solaris=tinterval-solaris-1947 tinterval/.*-sysv5=tinterval-solaris-1947 |