Commit a5d80cb0 authored by Bruce Momjian's avatar Bruce Momjian

Date-type fixes from Tatsuo Ishii

parent 75ebaa74
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.27 1997/07/01 00:22:43 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.28 1997/07/08 22:06:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2118,7 +2118,7 @@ printf( "datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02.0f %s dst=%d\n", ...@@ -2118,7 +2118,7 @@ printf( "datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02.0f %s dst=%d\n",
tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_gmtoff = tx->tm_gmtoff;
tm->tm_zone = tx->tm_zone; tm->tm_zone = tx->tm_zone;
*tzp = (tm->tm_isdst? (tm->tm_gmtoff - 3600): tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ *tzp = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */
if (tzn != NULL) *tzn = tm->tm_zone; if (tzn != NULL) *tzn = tm->tm_zone;
#endif #endif
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.27 1997/06/23 14:56:15 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.28 1997/07/08 22:06:46 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -149,6 +149,9 @@ printf( "datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02d %s dst=%d\n", ...@@ -149,6 +149,9 @@ printf( "datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02d %s dst=%d\n",
if (tzp != NULL) *tzp = (tm->tm_isdst? (timezone - 3600): timezone); if (tzp != NULL) *tzp = (tm->tm_isdst? (timezone - 3600): timezone);
if (tzn != NULL) strcpy( tzn, tzname[tm->tm_isdst]); if (tzn != NULL) strcpy( tzn, tzname[tm->tm_isdst]);
#else /* !HAVE_INT_TIMEZONE */ #else /* !HAVE_INT_TIMEZONE */
tm->tm_gmtoff = tx->tm_gmtoff;
tm->tm_zone = tx->tm_zone;
if (tzp != NULL) *tzp = - tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ if (tzp != NULL) *tzp = - tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */
/* XXX FreeBSD man pages indicate that this should work - tgl 97/04/23 */ /* XXX FreeBSD man pages indicate that this should work - tgl 97/04/23 */
if (tzn != NULL) strcpy( tzn, tm->tm_zone); if (tzn != NULL) strcpy( tzn, tm->tm_zone);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment