From a930e48277d8d3958ea29706787079d181aace8e Mon Sep 17 00:00:00 2001 From: Christopher Rabotin Date: Sun, 22 Dec 2024 19:53:48 -0700 Subject: [PATCH] Ha, I had an extra negation in the offset parsing! --- src/duration/parse.rs | 2 +- src/efmt/formatter.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/duration/parse.rs b/src/duration/parse.rs index 3dddcd9..80847ee 100644 --- a/src/duration/parse.rs +++ b/src/duration/parse.rs @@ -330,5 +330,5 @@ fn parse_offset(s: &str) -> Result { } } - Ok(-(hours * Unit::Hour + minutes * Unit::Minute + seconds * Unit::Second)) + Ok(hours * Unit::Hour + minutes * Unit::Minute + seconds * Unit::Second) } diff --git a/src/efmt/formatter.rs b/src/efmt/formatter.rs index a809ba6..cd9b08f 100644 --- a/src/efmt/formatter.rs +++ b/src/efmt/formatter.rs @@ -95,8 +95,8 @@ impl Formatter { pub fn with_timezone(epoch: Epoch, offset: Duration, format: Format) -> Self { Self { - epoch: epoch - offset, - offset: -offset, + epoch: epoch + offset, + offset, format, } }