summary refs log tree commit diff stats
path: root/lib/pure/times.nim
diff options
context:
space:
mode:
authorGULPF <oscarnihlgard@gmail.com>2017-10-03 07:31:06 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-03 07:31:06 +0200
commit0b7b116f047e4361e15b89fa9a6e947e8d385a95 (patch)
tree0cca58644fb4a77efb8c067231ded149d0580adb /lib/pure/times.nim
parent9d4f5c6d2cc8b1bfb709f14b9e8d21725d7d56a3 (diff)
downloadNim-0b7b116f047e4361e15b89fa9a6e947e8d385a95.tar.gz
Call tzset to initialize timezone (#6466)
Diffstat (limited to 'lib/pure/times.nim')
-rw-r--r--lib/pure/times.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index 68a457084..553e3fe01 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -77,6 +77,8 @@ when defined(posix) and not defined(JS):
 
   when not defined(freebsd) and not defined(netbsd) and not defined(openbsd):
     var timezone {.importc, header: "<time.h>".}: int
+    proc tzset(): void {.importc, header: "<time.h>".}
+    tzset()
 
 elif defined(windows):
   import winlean