View source code
Display the source code in std/datetime/systime.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aBugzilla 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 usinglocal clone.

Function std.datetime.systime.SysTimeToDosFileTime

Converts from SysTime to DOS file date/time.

uint SysTimeToDosFileTime(
  scope SysTime sysTime
) @safe;

Parameters

NameDescription
sysTime The SysTime to convert.

Throws

DateTimeException if the given SysTime cannot be converted to a DosFileTime.

Example

import std.datetime.date : DateTime;

// 0b00000000001000010000000000000000
writeln(SysTimeToDosFileTime(SysTime(DateTime(1980, 1, 1, 0, 0, 0))));
// 0b11111111100111111011111101111101
writeln(SysTimeToDosFileTime(SysTime(DateTime(2107, 12, 31, 23, 59, 58))));
writeln(SysTimeToDosFileTime(SysTime(DateTime(2011, 1, 31, 16, 34, 44)))); // 0x3E3F8456

Authors

Jonathan M Davis

License

Boost License 1.0.