View source code
Display the source code in std/datetime.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Function std.datetime.SysTime.toUnixTime
Returns a time_t
which represents the same time as this
SysTime
.
Note that like all conversions in std.datetime
, this is a truncating
conversion.
If time_t
is 32 bits, rather than 64, and the result can't fit in a
32-bit value, then the closest value that can be held in 32 bits will be
used (so time_t.max
if it goes over and time_t.min
if it goes
under).
Prototype
long toUnixTime() pure nothrow @safe const;
Authors
Jonathan M Davis and Kato Shoichi