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
Example
Get the current time as a SysTime
import stdExample
Construct a SysTime from a ISO time string
import stdExample
Make a specific point in time in the New York timezone
import coreFunctions
| Name | Description | 
|---|---|
| 
									DosFileTimeToSysTime(dft, tz)
								 | Converts from DOS file date/time to SysTime. | 
| 
									FILETIMEToStdTime(ft)
								 | This function is Windows-Only. | 
| 
									FILETIMEToStdTime(ft)
								 | This function is Windows-Only. | 
| 
									FILETIMEToSysTime(ft, tz)
								 | This function is Windows-Only. | 
| 
									FILETIMEToSysTime(ft, tz)
								 | This function is Windows-Only. | 
| 
									parseRFC822DateTime(value)
								 | The given array of charor random-access range ofcharorubyteis 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 correspondingSysTimewill be returned. | 
| 
									stdTimeToFILETIME(stdTime)
								 | This function is Windows-Only. | 
| 
									stdTimeToFILETIME(stdTime)
								 | This function is Windows-Only. | 
| 
									stdTimeToUnixTime(stdTime)
								 | 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(st, tz)
								 | This function is Windows-Only. | 
| 
									SYSTEMTIMEToSysTime(st, tz)
								 | This function is Windows-Only. | 
| 
									SysTimeToDosFileTime(sysTime)
								 | Converts from SysTimeto DOS file date/time. | 
| 
									SysTimeToFILETIME(sysTime)
								 | This function is Windows-Only. | 
| 
									SysTimeToFILETIME(sysTime)
								 | This function is Windows-Only. | 
| 
									SysTimeToSYSTEMTIME(sysTime)
								 | This function is Windows-Only. | 
| 
									SysTimeToSYSTEMTIME(sysTime)
								 | This function is Windows-Only. | 
| 
									unixTimeToStdTime(unixTime)
								 | 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
								 | SysTimeis the type used to get the current time from the
    system or doing anything that involves time zones. UnlikeDateTime, the time zone is an integral part ofSysTime(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,
    unlikeDateTime, 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
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.