Expand description
The nt-time
crate is a Windows NT system time
library.
This is used as timestamps such as Windows and 7z.
Examples
use core::time::Duration;
use nt_time::FileTime;
use time::OffsetDateTime;
let ft = FileTime::NT_EPOCH;
assert_eq!(
OffsetDateTime::try_from(ft).unwrap().to_string(),
"1601-01-01 0:00:00.0 +00:00:00"
);
let ft = ft + Duration::from_secs(11_644_473_600);
assert_eq!(
OffsetDateTime::try_from(ft).unwrap(),
OffsetDateTime::UNIX_EPOCH
);
assert_eq!(ft.as_u64(), 116_444_736_000_000_000);
assert_eq!(FileTime::new(u64::MAX), FileTime::MAX);
Re-exports
Modules
- Error types for this crate.
Structs
FileTime
is a type that represents the Windows NT system time.