View source code
Display the source code in std/datetime/systime.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module std.datetime.systime

Functions

Name Description
DosFileTimeToSysTime Converts from DOS file date/time to SysTime.
FILETIMEToStdTime This function is Windows-Only.
FILETIMEToSysTime This function is Windows-Only.
parseRFC822DateTime The given array of char or random-access range of char or ubyte is expected to be in the format specified in RFC 5322 section 3.3 with the grammar rule date-time. It is the date-time format commonly used in internet messages such as e-mail and HTTP. The corresponding SysTime will be returned.
stdTimeToFILETIME This function is Windows-Only.
stdTimeToUnixTime Converts std time (which uses midnight, January 1st, 1 A.D. UTC as its epoch and hnsecs as its units) to unix time (which uses midnight, January 1st, 1970 UTC as its epoch and seconds as its units).
SYSTEMTIMEToSysTime This function is Windows-Only.
SysTimeToDosFileTime Converts from SysTime to DOS file date/time.
SysTimeToFILETIME This function is Windows-Only.
SysTimeToSYSTEMTIME This function is Windows-Only.
unixTimeToStdTime Converts from unix time (which uses midnight, January 1st, 1970 UTC as its epoch and seconds as its units) to "std time" (which uses midnight, January 1st, 1 A.D. UTC and hnsecs as its units).

Classes

Name Description
Clock Effectively a namespace to make it clear that the methods it contains are getting the time from the system clock. It cannot be instantiated.

Structs

Name Description
SysTime SysTime is the type used to get the current time from the system or doing anything that involves time zones. Unlike std.datetime.date.DateTime, the time zone is an integral part of SysTime (though for local time applications, time zones can be ignored and it will work, since it defaults to using the local time zone). It holds its internal time in std time (hnsecs since midnight, January 1st, 1 A.D. UTC), so it interfaces well with the system time. However, that means that, unlike std.datetime.date.DateTime, it is not optimized for calendar-based operations, and getting individual units from it such as years or days is going to involve conversions and be less efficient.

Aliases

Name Type Description
DosFileTime uint Type representing the DOS file date/time format.

Authors

Jonathan M Davis

License

Boost License 1.0.

Comments