tango.time.WallClock

License:
BSD style:

Version:
Apr 2007: split away from utc

author:
Kris

struct 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.

static @property Time now();
Return the current local time

static @property TimeSpan zone();
Return the timezone relative to GMT. The value is negative when west of GMT

static 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

static 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

static Time fromDate(ref const(DateTime) dt);
Convert Date fields to local time

static Time toLocal(const(Time) utc);


static Time toUtc(const(Time) wall);



Page generated by Ddoc. Copyright (c) 2007 Kris Bell. All rights reserved