mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Fix from Yutaka Tanida <yutaka@marin.or.jp> for Cygwin32 support.
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: nabstime.c,v 1.53 1999/02/21 03:49:32 scrappy Exp $
|
||||
* $Id: nabstime.c,v 1.54 1999/04/26 04:42:49 ishii Exp $
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
@ -77,7 +77,12 @@ GetCurrentAbsoluteTime(void)
|
||||
tm = localtime(&now);
|
||||
|
||||
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]);
|
||||
#else
|
||||
#error USE_POSIX_TIME defined but no time zone available
|
||||
@ -167,7 +172,11 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
|
||||
strcpy(tzn, tm->tm_zone);
|
||||
#elif defined(HAVE_INT_TIMEZONE)
|
||||
if (tzp != NULL)
|
||||
#ifdef __CYGWIN__
|
||||
*tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone);
|
||||
#else
|
||||
*tzp = (tm->tm_isdst ? (timezone - 3600) : timezone);
|
||||
#endif
|
||||
if (tzn != NULL)
|
||||
strcpy(tzn, tzname[tm->tm_isdst]);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user