79127198

Date: 2024-10-25 20:16:43
Score: 1
Natty:
Report link

If you are using chrono >= 0.4.38 you will need to use the now feature in your Cargo.toml file:

[dependencies]
...
chrono = { version = "0.4.38", features = ["now"] }

Then you could use:

let timestamp = chrono::offset::Utc::now();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Supermanuu