pub trait Clock: Send + Sync {
// Required methods
fn local(&self) -> DateTime<Local>;
fn utc(&self) -> DateTime<Utc>;
}
Expand description
A trait for getting the current time.
This is supported on feature=clock
only.
Example.
Returns the current time in the local timezone.
Returns the current time in UTC.