Fix the span of "invalid time zone" (#6411)

Signed-off-by: nibon7 <nibon7@163.com>

Signed-off-by: nibon7 <nibon7@163.com>
This commit is contained in:
nibon7 2022-08-25 19:21:54 +08:00 committed by GitHub
parent e45b169cba
commit 7b07e976b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,7 +126,7 @@ fn _to_timezone(dt: DateTime<FixedOffset>, timezone: &Spanned<String>, span: Spa
match datetime_in_timezone(&dt, timezone.item.as_str()) {
Ok(dt) => Value::Date { val: dt, span },
Err(_) => Value::Error {
error: ShellError::UnsupportedInput(String::from("invalid time zone"), span),
error: ShellError::UnsupportedInput(String::from("invalid time zone"), timezone.span),
},
}
}