Skip to content

chrono: Address deprecation warnings #1208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Jan 11, 2024

warning: use of deprecated associated function `chrono::DateTime::<Tz>::from_utc`: Use TimeZone::from_utc_datetime() or DateTime::from_naive_utc_and_offset instead
   --> src/posts.rs:161:38
    |
161 |     chrono::DateTime::<chrono::Utc>::from_utc(
    |                                      ^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default


warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
   --> src/posts.rs:162:28
    |
162 |         chrono::NaiveDate::from_ymd(year, month, day).and_hms(0, 0, seconds),
    |                            ^^^^^^^^


warning: use of deprecated method `chrono::NaiveDate::and_hms`: use `and_hms_opt()` instead
   --> src/posts.rs:162:55
    |
162 |         chrono::NaiveDate::from_ymd(year, month, day).and_hms(0, 0, seconds),
    |                                                       ^^^^^^^

@Turbo87 Turbo87 mentioned this pull request Jan 11, 2024
@ehuss ehuss merged commit c0bb9e0 into rust-lang:master Jan 11, 2024
@Turbo87 Turbo87 deleted the chrono-deprecations branch February 1, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants