Changeset: 4c381fffc7df for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c381fffc7df
Modified Files:
clients/mapiclient/mclient.c
Branch: default
Log Message:
Fix the way in which we find out the time zone on Windows.
It's not currently daylight saving time, but the old code produced an
answer as if it was.
diffs (24 lines):
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2839,13 +2839,14 @@ set_timezone(Mapi mid)
/* figure out our current timezone */
#ifdef HAVE__GET_TIMEZONE
- long tz; /* type long required by _get_timezone() */
- int dst;
+ __time64_t ltime, lt, gt;
+ struct tm loctime;
- _tzset();
- _get_timezone(&tz);
- _get_dstbias(&dst);
- tzone = (int) (tz + dst);
+ _time64(<ime);
+ _localtime64_s(&loctime, <ime);
+ lt = _mktime64(&loctime);
+ gt = _mkgmtime64(&loctime);
+ tzone = (int) (lt - gt);
#else
time_t t, lt, gt;
struct tm *tmp;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list