Skip to content

Commit

Permalink
remove experimental and clarify why function is fallible
Browse files Browse the repository at this point in the history
  • Loading branch information
esheppa authored and djc committed Jun 21, 2022
1 parent cb92398 commit b1d74ae
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/naive/datetime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,13 @@ impl NaiveDateTime {
/// Converts the `NaiveDateTime` into the timezone-aware `DateTime<Tz>`
/// with the provided timezone, if possible.
///
/// This is experimental and might be removed in the future. Feel free to
/// let us know what you think about this API.
/// This can fail in cases where the local time represented by the `NaiveDateTime`
/// is not a valid local timestamp in the target timezone due to an offset transition
/// for example if the target timezone had a change from +00:00 to +01:00
/// occuring at 2015-09-05 22:59:59, then a local time of 2015-09-05 23:56:04
/// could never occur. Similarly, if the offset transitioned in the opposite direction
/// then there would be two local times of 2015-09-05 23:56:04, one at +00:00 and one
/// at +01:00.
///
/// # Example
///
Expand Down

0 comments on commit b1d74ae

Please sign in to comment.