Function std.datetime.stdTimeToUnixTime
Converts std time (which uses midnight, January 1st, 1 A.D. UTC as its epoch
and hnsecs as its units) to time_t (which uses midnight, January 1st,
1970 UTC as its epoch and seconds as its units). 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 stdTimeToUnixTime( long stdTime ) pure nothrow @safe;
Note
While Windows systems require that time_t be non-negative (in spite
of time_t being signed), this function still returns negative
numbers on Windows, since it's more flexible to allow negative time_t
for those who need it. If on Windows and using the
standard C functions or Win32 API functions which take a time_t,
check whether the return value of
is non-negative.
stdTimeToUnixTime
Parameters
| Name | Description |
|---|---|
| stdTime | The std time to convert. |
Authors
Jonathan M Davis and Kato Shoichi