Skip to content

Commit

Permalink
add doc desc
Browse files Browse the repository at this point in the history
  • Loading branch information
baoyachi committed Aug 17, 2022
1 parent f345a9e commit 1ce70bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ impl DateTime {

#[cfg(not(feature = "tzdb"))]
pub fn local_now() -> Result<Self, Box<dyn Error>> {
// Warning: Attempt to create a new OffsetDateTime with the current date and time in the local offset. If the offset cannot be determined, an error is returned.
// At present, using it on MacOS return error. Use it with careful.
// Suggestion use feature tzdb crate exposed function at below.
OffsetDateTime::now_local()
.map(DateTime::Local)
.map_err(|e| e.into())
Expand Down

0 comments on commit 1ce70bb

Please sign in to comment.