Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
fix: type in constant name
Lars Wirzenius committed 9 months ago
commit 4db74c77f255b4531acecf71978526e45f37bd7a
parent 3bb98f3
1 file changed +2 -2
modified src/util.rs
@@ -98,7 +98,7 @@ pub fn now() -> Result<String, UtilError> {
}

pub fn parse_timestamp(timestamp: &str) -> Result<OffsetDateTime, UtilError> {
-
    const SIMPLIFIED_ISO9601_WITH_Z: &[FormatItem<'static>] =
+
    const SIMPLIFIED_ISO8601_WITH_Z: &[FormatItem<'static>] =
        format_description!("[year]-[month]-[day] [hour]:[minute]:[second]Z");

    fn parse_one(
@@ -114,7 +114,7 @@ pub fn parse_timestamp(timestamp: &str) -> Result<OffsetDateTime, UtilError> {
        }
    }

-
    if let Ok(t) = parse_one(timestamp, SIMPLIFIED_ISO9601_WITH_Z) {
+
    if let Ok(t) = parse_one(timestamp, SIMPLIFIED_ISO8601_WITH_Z) {
        Ok(t)
    } else {
        Err(UtilError::TimestampParse(timestamp.into()))