Skip to content

Commit

Permalink
fix: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin-Ray committed Jun 21, 2024
1 parent 3c50102 commit fe56393
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/proof-of-sql/src/base/time/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ impl TryFrom<&str> for PoSQLTimeZone {
}
}

impl FromStr for PoSQLTimeZone {
type Err = &'static str;

fn from_str(value: &str) -> Result<Self, Self::Err> {
Tz::from_str(value)
.map(PoSQLTimeZone)
.map_err(|_| "Invalid timezone string")
}
}

/// Specifies different units of time measurement relative to the Unix epoch. It is essentially
/// a wrapper over [arrow::datatypes::TimeUnit] so that we can derive Copy and implement custom traits
/// such as bit distribution and Hash.
Expand Down

0 comments on commit fe56393

Please sign in to comment.