mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
Fixed compilation of times.nim with mingw 4.9.2 C++ 32bit
This commit is contained in:
@@ -53,8 +53,11 @@ when defined(posix):
|
||||
elif defined(windows):
|
||||
import winlean
|
||||
|
||||
# newest version of Visual C++ defines time_t to be of 64 bits
|
||||
type CTime {.importc: "time_t", header: "<time.h>".} = distinct int64
|
||||
when defined(i386) and defined(gcc):
|
||||
type CTime {.importc: "time_t", header: "<time.h>".} = distinct int32
|
||||
else:
|
||||
# newest version of Visual C++ defines time_t to be of 64 bits
|
||||
type CTime {.importc: "time_t", header: "<time.h>".} = distinct int64
|
||||
# visual c's c runtime exposes these under a different name
|
||||
var timezone {.importc: "_timezone", header: "<time.h>".}: int
|
||||
|
||||
@@ -1398,7 +1401,7 @@ proc getLocalTime*(time: Time): DateTime {.tags: [], raises: [], benign, depreca
|
||||
|
||||
proc getGMTime*(time: Time): DateTime {.tags: [], raises: [], benign, deprecated.} =
|
||||
## Converts the calendar time `time` to broken-down time representation,
|
||||
## expressed in Coordinated Universal Time (UTC).
|
||||
## expressed in Coordinated Universal Time (UTC).
|
||||
##
|
||||
## **Deprecated since v0.18.0:** use ``utc`` instead
|
||||
time.utc
|
||||
|
||||
Reference in New Issue
Block a user