From 3044afcbbf0dbff0f0bc198aaedcb70cb4645197 Mon Sep 17 00:00:00 2001 From: LRN Date: Tue, 8 Oct 2013 09:30:30 +0000 Subject: Update make GNUNET_STRINGS_fancy_time_to_absolute return local time on W32 --- src/util/strings.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/util/strings.c') diff --git a/src/util/strings.c b/src/util/strings.c index cddb4bb07..59cdf5250 100644 --- a/src/util/strings.c +++ b/src/util/strings.c @@ -367,6 +367,16 @@ GNUNET_STRINGS_fancy_time_to_absolute (const char *fancy_time, atime->abs_value_us = (uint64_t) ((uint64_t) t * 1000LL * 1000LL); #if LINUX atime->abs_value_us -= 1000LL * 1000LL * timezone; +#elif defined WINDOWS + { + DWORD tzv; + TIME_ZONE_INFORMATION tzi; + tzv = GetTimeZoneInformation (&tzi); + if (TIME_ZONE_ID_INVALID != tzv) + { + atime->abs_value_us -= 1000LL * 1000LL * tzi.Bias * 60LL; + } + } #endif return GNUNET_OK; } -- cgit v1.2.3