*** ../src/backend/utils/adt/nabstime.c.orig Sun Dec 20 17:35:40 1998 --- ../src/backend/utils/adt/nabstime.c Thu Dec 31 16:19:51 1998 *************** *** 57,63 **** if (!HasCTZSet) { #ifdef USE_POSIX_TIME ! #ifdef HAVE_TM_ZONE tm = localtime(&now); CTimeZone = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ --- 57,63 ---- if (!HasCTZSet) { #ifdef USE_POSIX_TIME ! #if defined(HAVE_TM_ZONE) tm = localtime(&now); CTimeZone = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ *************** *** 86,94 **** CTimeZone = tb.timezone * 60; CDayLight = (tb.dstflag != 0); ! /* ! * XXX does this work to get the local timezone string in V7? - ! * tgl 97/03/18 */ strftime(CTZName, MAXTZLEN, "%Z", localtime(&now)); #endif --- 86,93 ---- CTimeZone = tb.timezone * 60; CDayLight = (tb.dstflag != 0); ! /* XXX does this work to get the local timezone string in V7? ! * - tgl 97/03/18 */ strftime(CTZName, MAXTZLEN, "%Z", localtime(&now)); #endif *************** *** 136,149 **** #endif #if defined(DATEDEBUG) ! #if (! defined(HAVE_TM_ZONE)) && defined(HAVE_INT_TIMEZONE) ! printf("datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02d %s %s dst=%d\n", ! tx->tm_year, tx->tm_mon, tx->tm_mday, tx->tm_hour, tx->tm_min, tx->tm_sec, ! tzname[0], tzname[1], tx->tm_isdst); ! #else printf("datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02d %s dst=%d\n", tx->tm_year, tx->tm_mon, tx->tm_mday, tx->tm_hour, tx->tm_min, tx->tm_sec, tx->tm_zone, tx->tm_isdst); #endif #endif --- 135,148 ---- #endif #if defined(DATEDEBUG) ! #if defined(HAVE_TM_ZONE) printf("datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02d %s dst=%d\n", tx->tm_year, tx->tm_mon, tx->tm_mday, tx->tm_hour, tx->tm_min, tx->tm_sec, tx->tm_zone, tx->tm_isdst); + #elif defined(HAVE_INT_TIMEZONE) + printf("datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02d %s %s dst=%d\n", + tx->tm_year, tx->tm_mon, tx->tm_mday, tx->tm_hour, tx->tm_min, tx->tm_sec, + tzname[0], tzname[1], tx->tm_isdst); #endif #endif *************** *** 157,163 **** tm->tm_sec = tx->tm_sec; tm->tm_isdst = tx->tm_isdst; ! #ifdef HAVE_TM_ZONE tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_zone = tx->tm_zone; --- 156,162 ---- tm->tm_sec = tx->tm_sec; tm->tm_isdst = tx->tm_isdst; ! #if defined(HAVE_TM_ZONE) tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_zone = tx->tm_zone; *************** *** 171,177 **** *tzp = (tm->tm_isdst ? (timezone - 3600) : timezone); if (tzn != NULL) strcpy(tzn, tzname[tm->tm_isdst]); ! #else /* !HAVE_INT_TIMEZONE */ #error POSIX time support is broken #endif #else /* ! USE_POSIX_TIME */ --- 170,176 ---- *tzp = (tm->tm_isdst ? (timezone - 3600) : timezone); if (tzn != NULL) strcpy(tzn, tzname[tm->tm_isdst]); ! #else #error POSIX time support is broken #endif #else /* ! USE_POSIX_TIME */