Skip to content

Commit

Permalink
Ha, I had an extra negation in the offset parsing!
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherRabotin committed Dec 23, 2024
1 parent 84977e0 commit a930e48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/duration/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,5 +330,5 @@ fn parse_offset(s: &str) -> Result<Duration, HifitimeError> {
}
}

Ok(-(hours * Unit::Hour + minutes * Unit::Minute + seconds * Unit::Second))
Ok(hours * Unit::Hour + minutes * Unit::Minute + seconds * Unit::Second)
}
4 changes: 2 additions & 2 deletions src/efmt/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down

0 comments on commit a930e48

Please sign in to comment.