gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29965 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r29965 - gnunet/src/util
Date: Tue, 8 Oct 2013 11:30:30 +0200

Author: LRN
Date: 2013-10-08 11:30:30 +0200 (Tue, 08 Oct 2013)
New Revision: 29965

Modified:
   gnunet/src/util/strings.c
Log:
Update make GNUNET_STRINGS_fancy_time_to_absolute return local time on W32

Modified: gnunet/src/util/strings.c
===================================================================
--- gnunet/src/util/strings.c   2013-10-08 09:30:27 UTC (rev 29964)
+++ gnunet/src/util/strings.c   2013-10-08 09:30:30 UTC (rev 29965)
@@ -367,6 +367,16 @@
   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;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]