as the title suggests. I imported chrono 0.4 just like in the documentation Here
And when i ever i call Utc::now() to get current UTC time, i get error that the function now() doesn't not exists.
Here is my Cargo import:
chrono = { version = "0.4", default-features = false}
Here is the code snippet to get current UTC time:
use chrono::prelude::*;
#[ink(message)]
pub fn get_todays_date(&self) -> String{
//let local= Local::now();
let utc= Utc::now();
utc.to_string()
}
When i ever i try to compile this code, i get the following error:
|
335 | let utc= Utc::now();
| ^^^ function or associated item not found in `chrono::Utc`