aboutsummaryrefslogtreecommitdiff
path: root/tests/timestamp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/timestamp')
-rw-r--r--tests/timestamp/driver.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/timestamp/driver.cxx b/tests/timestamp/driver.cxx
index b268e00..d1e8d2c 100644
--- a/tests/timestamp/driver.cxx
+++ b/tests/timestamp/driver.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <time.h> // tzset()
+#include <time.h> // tzset() (POSIX), _tzset() (Windows)
#include <chrono>
#include <locale>
@@ -80,7 +80,13 @@ ns (unsigned long long t)
int
main ()
{
- tzset (); // To use butl::to_stream() later on.
+ // To use butl::to_stream() later on.
+ //
+#ifndef _WIN32
+ tzset ();
+#else
+ _tzset ();
+#endif
// Invalid %[].
//