diff --git a/crates/nu-command/src/date/to_timezone.rs b/crates/nu-command/src/date/to_timezone.rs index fc4cc3990e..9c690f6221 100644 --- a/crates/nu-command/src/date/to_timezone.rs +++ b/crates/nu-command/src/date/to_timezone.rs @@ -126,7 +126,7 @@ fn _to_timezone(dt: DateTime, timezone: &Spanned, 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), }, } }