You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
m13253
changed the title
Move fs::Metadata::modified to modified_as_ms and reserve for the real Datetime type
Move fs::Metadata::modified to modified_as_ms and reserve for the real Datetime type
Feb 14, 2015
m13253
changed the title
Move fs::Metadata::modified to modified_as_ms and reserve for the real Datetime type
Move fs::Metadata::modified to modified_as_ms and reserve for the real Datetime type
Feb 14, 2015
Thanks for the issue! This will definitely come up in stabilizing Metadata::modified, and as-is it is definitely not slated for stabilization (for the exact reasons you specify). As a result I'm going to close this issue as we probably don't want to open an RFC issue for all unstable APIs!
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
tomodified_as_ms
and reserve for the realDatetime
type.My reasons:
Datetime
type is invented.u64
is far not enough.modified
.Related PR #739
The text was updated successfully, but these errors were encountered: