From 55db643048b0282b05601a47909ceae51609cd0f Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Sun, 10 Nov 2024 07:35:18 -0600 Subject: [PATCH] ignore without_timezone test for now (#14297) # Description Since the human-date-parser was switched to use the users local timezone, this test may not be needed anymore. I've just ignored it for now and put a comment about why it's being ignored. There are more discussions on this topic here https://github.com/nushell/nushell/pull/14266 # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-command/src/conversions/into/datetime.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/nu-command/src/conversions/into/datetime.rs b/crates/nu-command/src/conversions/into/datetime.rs index fd183b43bd..dcb37291af 100644 --- a/crates/nu-command/src/conversions/into/datetime.rs +++ b/crates/nu-command/src/conversions/into/datetime.rs @@ -507,7 +507,14 @@ mod tests { } #[test] + #[ignore] fn takes_a_date_format_without_timezone() { + // Ignoring this test for now because we changed the human-date-parser to use + // the users timezone instead of UTC. We may continue to tweak this behavior. + // Another hacky solution is to set the timezone to UTC in the test, which works + // on MacOS and Linux but hasn't been tested on Windows. Plus it kind of defeats + // the purpose of a "without_timezone" test. + // std::env::set_var("TZ", "UTC"); let date_str = Value::test_string("16.11.1984 8:00 am"); let fmt_options = Some(DatetimeFormat("%d.%m.%Y %H:%M %P".to_string())); let args = Arguments {