You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
--> src/main.rs:60:60
|
60 | date: DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(61, 0), Utc),
| ^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
I figure this should be as simple as replacing NaiveDateTime::from_timestamp(61, 0) with NaiveDateTime::from_timestamp_opt(61, 0).unwrap(), happy to open a PR to do so!
The text was updated successfully, but these errors were encountered:
greg-el
changed the title
Deprecated from_timestamp method used in example for NaiveDateTime
Deprecated from_timestamp method used in example for NaiveDateTimeJan 5, 2023
greg-el
changed the title
Deprecated from_timestamp method used in example for NaiveDateTime
Deprecated from_timestamp method used in example for DateTimeJan 5, 2023
The example given in https://docs.rs/chrono/latest/chrono/struct.DateTime.html#example appears to use the deprecated
from_timestamp
:I figure this should be as simple as replacing
NaiveDateTime::from_timestamp(61, 0)
withNaiveDateTime::from_timestamp_opt(61, 0).unwrap()
, happy to open a PR to do so!The text was updated successfully, but these errors were encountered: