diff --git a/checkin_notes b/checkin_notes index b8f5745d10..54ea9a0691 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6057,14 +6057,16 @@ David 4 May 2005 schema.sql Bruce 4 May 2005 - - bug fix so that Unix hosts report their timezones correctly. - NOTE: hosts that lack a gmt offset in the tm structure (System V - with no BSD extensions) will have the WRONG SIGN for the timezone. - This can be fixed by changing the signs of __timezone, _timezone and - timezone in get_timezone(), but I won't do it until David signs - off. + - bug fix so that Unix hosts report their timezones correctly + taking into account the effect of DST on their localtime. - - Note that with this change we adopt the convention that the database + NOTE: hosts that lacked a gmt offset in the tm structure (System V + with no BSD extensions) had the WRONG SIGN for the timezone. + This is now fixed. These host types (AIX, Cygwin?) will now have a + change in sign in their timezone, making it consistent with other + Unix hosts and with Win32 hosts. + + - Note that with these changes we adopt the convention that the database timezone value is the (Local Standard Time) - (UTC time). This quantity only depends upon spatial location on the earth's surface and is NOT a function of time. diff --git a/client/hostinfo_unix.C b/client/hostinfo_unix.C index 0655eb2eff..ac0b81db81 100644 --- a/client/hostinfo_unix.C +++ b/client/hostinfo_unix.C @@ -118,14 +118,11 @@ int get_timezone() { return time_data->tm_gmtoff; } #elif defined(linux) - return __timezone; - // SHOULD BE -1*__timezone; + return -1*(__timezone); #elif defined(__CYGWIN32__) - return _timezone; - // SHOULD BE -1*_timezone; + return -1*(_timezone); #elif defined(unix) - return timezone; - // SHOULD BE -1*timezone; + return -1*timezone; #else #error timezone #endif