Skip to content

Commit

Permalink
Document return value due to soundness issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Nov 30, 2020
1 parent 7d353c8 commit 288c942
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/offset_date_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ impl OffsetDateTime {
/// assert!(OffsetDateTime::now_local().is_ok());
/// # }
/// ```
///
/// Due to a [soundness bug](https://github.com/time-rs/time/issues/293),
/// the error value is currently always returned on Unix-like platforms.
#[cfg(feature = "local-offset")]
#[cfg_attr(__time_03_docs, doc(cfg(feature = "local-offset")))]
pub fn now_local() -> Result<Self, error::IndeterminateOffset> {
Expand Down
3 changes: 3 additions & 0 deletions src/utc_offset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ impl UtcOffset {
/// assert!(local_offset.is_ok());
/// # }
/// ```
///
/// Due to a [soundness bug](https://github.com/time-rs/time/issues/293),
/// the error value is currently always returned on Unix-like platforms.
#[cfg(feature = "local-offset")]
#[cfg_attr(__time_03_docs, doc(cfg(feature = "local-offset")))]
pub fn local_offset_at(datetime: OffsetDateTime) -> Result<Self, error::IndeterminateOffset> {
Expand Down

0 comments on commit 288c942

Please sign in to comment.