Display a hint when parsing an invalid timestamp.

- Display a hint when parsing an invalid ISO8601 timestamp.
This commit is contained in:
Neal H. Walfield 2024-06-20 14:37:52 +02:00
parent 846d819368
commit 77a5047c6b
No known key found for this signature in database
GPG Key ID: 6863C9AD5B4D22D3

View File

@ -1068,7 +1068,8 @@ impl Time {
return Ok(DateTime::from_utc(d.and_time(pad_date_with), Utc));
}
}
Err(anyhow::anyhow!("Malformed ISO8601 timestamp: {}", s))
Err(anyhow::anyhow!("Malformed ISO8601 timestamp: {}.\n\
Try: YYYY-MM-DD[Thh:mm[:ss][[+|-]hh[:mm]]]", s))
}
}