[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31771 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31771 - gnunet/src/util |
Date: |
Sun, 29 Dec 2013 22:11:00 +0100 |
Author: harsha
Date: 2013-12-29 22:11:00 +0100 (Sun, 29 Dec 2013)
New Revision: 31771
Modified:
gnunet/src/util/
gnunet/src/util/strings.c
Log:
- fix for incorporating day light savings time
Index: gnunet/src/util
===================================================================
--- gnunet/src/util 2013-12-29 17:08:38 UTC (rev 31770)
+++ gnunet/src/util 2013-12-29 21:11:00 UTC (rev 31771)
Property changes on: gnunet/src/util
___________________________________________________________________
Modified: svn:ignore
## -1,3 +1,5 ##
+*.log
+*.trs
gnunet-qr
test_crypto_eddsa
test_crypto_ecdsa
Modified: gnunet/src/util/strings.c
===================================================================
--- gnunet/src/util/strings.c 2013-12-29 17:08:38 UTC (rev 31770)
+++ gnunet/src/util/strings.c 2013-12-29 21:11:00 UTC (rev 31771)
@@ -347,9 +347,6 @@
{
struct tm tv;
time_t t;
-#if HAVE_TM_GMTOFF
- struct tm *tp;
-#endif
if (0 == strcasecmp ("end of time", fancy_time))
{
@@ -370,12 +367,7 @@
return GNUNET_SYSERR;
t = mktime (&tv);
atime->abs_value_us = (uint64_t) ((uint64_t) t * 1000LL * 1000LL);
-#if HAVE_TM_GMTOFF
- tp = localtime (&t);
- atime->abs_value_us += 1000LL * 1000LL * tp->tm_gmtoff;
-#elif defined LINUX
- atime->abs_value_us -= 1000LL * 1000LL * timezone;
-#elif defined WINDOWS
+#if WINDOWS
{
DWORD tzv;
TIME_ZONE_INFORMATION tzi;
@@ -744,7 +736,7 @@
if (t.abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
return _("end of time");
tt = t.abs_value_us / 1000LL / 1000LL;
- tp = gmtime (&tt);
+ tp = localtime (&tt);
/* This is hacky, but i don't know a way to detect libc character encoding.
* Just expect utf8 from glibc these days.
* As for msvcrt, use the wide variant, which always returns utf16
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31771 - gnunet/src/util,
gnunet <=