diff options
author | LRN <lrn1986@gmail.com> | 2013-10-08 09:30:30 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-10-08 09:30:30 +0000 |
commit | 3044afcbbf0dbff0f0bc198aaedcb70cb4645197 (patch) | |
tree | 2612271d62f5f762a2aab844f586e0718b84926e /src/util/strings.c | |
parent | 3e996078dc075428545ac4646937f437a02802cb (diff) | |
download | gnunet-3044afcbbf0dbff0f0bc198aaedcb70cb4645197.tar.gz gnunet-3044afcbbf0dbff0f0bc198aaedcb70cb4645197.zip |
Update make GNUNET_STRINGS_fancy_time_to_absolute return local time on W32
Diffstat (limited to 'src/util/strings.c')
-rw-r--r-- | src/util/strings.c | 10 |
1 files changed, 10 insertions, 0 deletions
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, | |||
367 | atime->abs_value_us = (uint64_t) ((uint64_t) t * 1000LL * 1000LL); | 367 | atime->abs_value_us = (uint64_t) ((uint64_t) t * 1000LL * 1000LL); |
368 | #if LINUX | 368 | #if LINUX |
369 | atime->abs_value_us -= 1000LL * 1000LL * timezone; | 369 | atime->abs_value_us -= 1000LL * 1000LL * timezone; |
370 | #elif defined WINDOWS | ||
371 | { | ||
372 | DWORD tzv; | ||
373 | TIME_ZONE_INFORMATION tzi; | ||
374 | tzv = GetTimeZoneInformation (&tzi); | ||
375 | if (TIME_ZONE_ID_INVALID != tzv) | ||
376 | { | ||
377 | atime->abs_value_us -= 1000LL * 1000LL * tzi.Bias * 60LL; | ||
378 | } | ||
379 | } | ||
370 | #endif | 380 | #endif |
371 | return GNUNET_OK; | 381 | return GNUNET_OK; |
372 | } | 382 | } |