std.os.windows: Change to handle Windows file time as u64
value
#22448
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FILETIME
structure stores a 64-bit unsigned integer value. The maximum value for this is "+60056-05-28 05:36:10.955161500 UTC". The maximum value of theFILETIME
thatFileTimeToSystemTime
function accepts is "+30828-09-14 02:48:05.477580700 UTC". This is the same as the maximum value for a 64-bit signed integer or 63-bit unsigned integer types.I've searched on these types and the timestamp of NTFS, and I think any value before "1601-01-01 00:00:00 UTC" is invalid. So I don't think we need to accept the negative Windows file time.
The maximum value of the NTFS timestamp and
FileTimeToSystemTime
function is "+30828-09-14 02:48:05.477580700 UTC", sou63
might be better thanu64
.