-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std/time: Give an example to get UNIX_EPOCH in seconds #44315
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
rebased from PR #44301 |
src/libstd/time/mod.rs
Outdated
/// match SystemTime::now().duration_since(UNIX_EPOCH) { | ||
/// Ok(n) => println!("1970-01-01 00:00:00 UTC was {} seconds ago!", n.as_secs()), | ||
/// Err(_) => panic!("SystemTime before UNIX EPOCH!"), | ||
/// }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless semicolon.
And just |
935d29e
to
1c5bf24
Compare
Oh, I didn't realize you could force a push updating a remote branch without breaking everything at github.. neat! Done. |
Thanks! @bors: r+ rollup |
📌 Commit 1c5bf24 has been approved by |
…d, r=GuillaumeGomez std/time: Give an example to get UNIX_EPOCH in seconds
…d, r=GuillaumeGomez std/time: Give an example to get UNIX_EPOCH in seconds
No description provided.