clockwork
clockwork copied to clipboard
Migrate off deprecated chrono interfaces
When building, we get a few of these warnings. Let's migrate from from_timestamp()
to from_timestamp_opt()
.
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
--> src/state/thread.rs:557:28
|
557 | NaiveDateTime::from_timestamp(after, 0),
| ^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
@nickgarfield not seeing these warnings anywhere, steps to reproduce?
env: rustc 1.65.0 (897e37553 2022-11-02)
I was seeing these when running our "build all" script. It does a cargo build, anchor build, and then sets up the localnet configs.
./scripts/build-all.sh .
Update: these warnings are only thrown when using the Rust nightly toolchain. No need for an immediate fix.