Skip to content
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

use of deprecated method chrono::DateTime::<Tz>::timestamp_nanos #2507

Closed
evenyag opened this issue Sep 27, 2023 · 1 comment
Closed

use of deprecated method chrono::DateTime::<Tz>::timestamp_nanos #2507

evenyag opened this issue Sep 27, 2023 · 1 comment
Assignees
Labels
C-enhancement Category Enhancements

Comments

@evenyag
Copy link
Contributor

evenyag commented Sep 27, 2023

What type of enhancement is this?

Other

What does the enhancement do?

common-time crate has the following compiler warnings

   Compiling common-time v0.4.0-nightly (/Users/evenyag/codes/greptime/bench-mito2/src/common/time)
warning: use of deprecated method `chrono::DateTime::<Tz>::timestamp_nanos`: use `timestamp_nanos_opt()` instead
  --> /Users/evenyag/codes/greptime/bench-mito2/src/common/time/src/timestamp.rs:66:41
   |
66 |             TimeUnit::Nanosecond => now.timestamp_nanos(),
   |                                         ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated method `chrono::TimeZone::datetime_from_str`: use `DateTime::parse_from_str` instead
   --> /Users/evenyag/codes/greptime/bench-mito2/src/common/time/src/timestamp.rs:301:29
    |
301 |         if let Ok(ts) = Utc.datetime_from_str(s, "%Y-%m-%d %H:%M:%S%.fZ") {
    |                             ^^^^^^^^^^^^^^^^^

Implementation challenges

We need to fix unit tests.

@evenyag evenyag added the C-enhancement Category Enhancements label Sep 27, 2023
@evenyag evenyag added this to mito2 Oct 7, 2023
@evenyag evenyag moved this to Todo in mito2 Oct 7, 2023
@v0y4g3r
Copy link
Contributor

v0y4g3r commented Oct 7, 2023

Closing this issue as I cannot reproduce on 657542c.
Feel free to reopen it once anybody come across it again.

@v0y4g3r v0y4g3r closed this as completed Oct 7, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in mito2 Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
Archived in project
Development

No branches or pull requests

2 participants