MicrosecondsClock.toTm

Converts t to a tm struct, specifying the year, months, days, hours, minutes, and seconds.

  1. tm toTm(time_t t, bool local)
    class MicrosecondsClock
    static
    tm
    toTm
    (
    time_t t
    ,
    bool local = false
    )
    out (datetime) { assert (local || datetime.tm_isdst <= 0, "DST enabled with GMT"); }
  2. tm toTm(timeval t, ulong us)

Parameters

t time_t

time in seconds to convert

local bool

true: return local time, false: return GMT.

Return Value

Type: tm

the t as tm struct.

Out: DST can be enabled with local time only.

Meta