The OpenD Programming Language

Timestamp.fromUnixTime

struct Timestamp
static @safe pure nothrow @nogc
fromUnixTime
(
long time
)

Examples

import mir.format;
assert(Timestamp.fromUnixTime(0) == Timestamp(1970, 1, 1, 0, 0, 0));
assert(Timestamp.fromUnixTime(1_198_311_285) == Timestamp(2007, 12, 22, 8, 14, 45));
assert(Timestamp.fromUnixTime(-1) == Timestamp(1969, 12, 31, 23, 59, 59));

Meta