Merge pull request #2309 from oderwat/fix-tzname
Fixes tzname on osx (and presumable bsd).
This commit is contained in:
commit
c707923cc1
1 changed files with 5 additions and 0 deletions
|
|
@ -49,6 +49,11 @@ when defined(posix) and not defined(JS):
|
||||||
proc posix_gettimeofday(tp: var Timeval, unused: pointer = nil) {.
|
proc posix_gettimeofday(tp: var Timeval, unused: pointer = nil) {.
|
||||||
importc: "gettimeofday", header: "<sys/time.h>".}
|
importc: "gettimeofday", header: "<sys/time.h>".}
|
||||||
|
|
||||||
|
# we also need tzset() to make sure that tzname is initialized
|
||||||
|
proc tzset() {.importc, header: "<sys/time.h>".}
|
||||||
|
# calling tzset() implicitly to initialize tzname data.
|
||||||
|
tzset()
|
||||||
|
|
||||||
elif defined(windows):
|
elif defined(windows):
|
||||||
import winlean
|
import winlean
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue