We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4126a5 commit fd48466Copy full SHA for fd48466
gix-date/src/parse.rs
@@ -33,7 +33,9 @@ pub(crate) mod function {
33
}
34
35
Ok(if let Ok(val) = Date::strptime(SHORT.0, input) {
36
- let val = val.to_zoned(TimeZone::UTC).expect("date is in range");
+ let val = val
37
+ .to_zoned(TimeZone::UTC)
38
+ .map_err(|_| Error::InvalidDateString { input: input.into() })?;
39
Time::new(val.timestamp().as_second(), val.offset().seconds())
40
} else if let Ok(val) = rfc2822_relaxed(input) {
41
0 commit comments