alexcrichton / filetime

Accessing file timestamps in a platform-agnostic fashion in Rust
Apache License 2.0
122 stars 56 forks source link

Add option to create FileTime from custom date #73

Open wldevries opened 2 years ago

wldevries commented 2 years ago

I'd like to have an option to create a FileTime struct for a specific date. Since FileTime can only be constructed from a SystemTime instance there is no way to initialize it with a specific date (unless I miss something).

API could look like that of chrono:

FileTime::ymd(2021, 11, 18).and_hms_milli(17, 00, 12, 123);