Closed
Description
As is documented here: std::fs::Metadata::modified, method modifed
returns the modification time in milliseconds since the epoch.
We don't yet have a Datetime yet. We even haven't decided which epoch to use at the moment! But we will surely have one some time in the future.
I suggest we move modified
to modified_as_ms
and reserve for the real Datetime
type.
My reasons:
- If we don't do that, inconsistency will be introduced when the real
Datetime
type is invented. - Some filesystems (e.g. ext4) provide modification time in a nanosecond accuracy (10-9s). Milliseconds are far not enough, a single
u64
is far not enough. - Reserving in advance will reduce the pain at the transition. Instead of making old codes fail to compile, we can issue a "deprecated" warning then, to let the programmer switch to the final real
modified
.
Related PR #739
Metadata
Metadata
Assignees
Labels
No labels