WallClock

Exposes wall-time relative to Jan 1st, 1 AD. These values are based upon a clock-tick of 100ns, giving them a span of greater than 10,000 years. These Units of time are the foundation of most time and date functionality in Tango.

Please note that conversion between UTC and Wall time is performed in accordance with the OS facilities. In particular, Win32 systems behave differently to Posix when calculating daylight-savings time (Win32 calculates with respect to the time of the call, whereas a Posix system calculates based on a provided point in time). Posix systems should typically have the TZ environment variable set to a valid descriptor.

Members

Properties

now
Time now [@property getter]

Return the current local time

now
Time now [@property getter]

Return the current local time

zone
TimeSpan zone [@property getter]

Return the timezone relative to GMT. The value is negative when west of GMT

zone
TimeSpan zone [@property getter]

Return the timezone relative to GMT. The value is negative when west of GMT

Static functions

fromDate
Time fromDate(const(DateTime) date)

Convert Date fields to local time

fromDate
Time fromDate(const(DateTime) dt)

Convert Date fields to local time

toDate
DateTime toDate()

Set fields to represent a local version of the current UTC time. All values must fall within the domain supported by the OS

toDate
DateTime toDate(const(Time) utc)

Set fields to represent a local version of the provided UTC time. All values must fall within the domain supported by the OS

toDate
DateTime toDate()

Set fields to represent a local version of the current UTC time. All values must fall within the domain supported by the OS

toDate
DateTime toDate(const(Time) utc)

Set fields to represent a local version of the provided UTC time. All values must fall within the domain supported by the OS

toLocal
Time toLocal(const(Time) utc)
toUtc
Time toUtc(const(Time) wall)

Meta