pub fn add_hours(dt: DateTime<Utc>, hours: i64) -> DateTime<Utc>Expand description
Add specified number of hours to a UTC datetime
§Parameters
dt: Original UTC datetimehours: Number of hours to add (can be negative)
§Returns
UTC datetime after adding specified hours
§Examples
let now = Utc::now();
let later = add_hours(now, 3); // 3 hours later
let earlier = add_hours(now, -3); // 3 hours ago