aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_strings.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2014-01-08 14:14:47 +0000
committerLRN <lrn1986@gmail.com>2014-01-08 14:14:47 +0000
commit64ffb28af8a3d43dc23bca614f2538f5503f149e (patch)
tree809effaf1d16595ae925e13113991fc2425f6ed7 /src/util/test_strings.c
parent73bbb9dfcfaa75720f90d35f4f9e9bf731ea9bc5 (diff)
downloadgnunet-64ffb28af8a3d43dc23bca614f2538f5503f149e.tar.gz
gnunet-64ffb28af8a3d43dc23bca614f2538f5503f149e.zip
Remove the W32 timezone hack to match r31771
Diffstat (limited to 'src/util/test_strings.c')
-rw-r--r--src/util/test_strings.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/util/test_strings.c b/src/util/test_strings.c
index 839b81c04..41a602b6e 100644
--- a/src/util/test_strings.c
+++ b/src/util/test_strings.c
@@ -108,9 +108,26 @@ main (int argc, char *argv[])
108 108
109 at.abs_value_us = 50000000000; 109 at.abs_value_us = 50000000000;
110 bc = GNUNET_STRINGS_absolute_time_to_string (at); 110 bc = GNUNET_STRINGS_absolute_time_to_string (at);
111
111 GNUNET_assert (GNUNET_OK == 112 GNUNET_assert (GNUNET_OK ==
112 GNUNET_STRINGS_fancy_time_to_absolute (bc, &atx)); 113 GNUNET_STRINGS_fancy_time_to_absolute (bc, &atx));
113 GNUNET_assert (atx.abs_value_us == at.abs_value_us); 114
115 if (atx.abs_value_us != at.abs_value_us)
116 {
117#ifdef WINDOWS
118 DWORD tzv;
119 TIME_ZONE_INFORMATION tzi;
120 tzv = GetTimeZoneInformation (&tzi);
121 if (TIME_ZONE_ID_INVALID != tzv)
122 {
123 atx.abs_value_us -= 1000LL * 1000LL * tzi.Bias * 60LL;
124 }
125 if (atx.abs_value_us == at.abs_value_us)
126 fprintf (stderr,
127 "WARNING: GNUNET_STRINGS_fancy_time_to_absolute() miscalculates timezone!\n");
128#endif
129 GNUNET_assert (0);
130 }
114 131
115 GNUNET_log_skip (2, GNUNET_NO); 132 GNUNET_log_skip (2, GNUNET_NO);
116 b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "unknown"); 133 b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "unknown");