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

tests: fix deprecation warning timestamp_subsec_nanos() #6149

Merged
merged 2 commits into from
Mar 30, 2024

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Mar 30, 2024

When building coreutils I got the following deprecation warning:

warning: use of deprecated method `chrono::NaiveDateTime::timestamp_subsec_nanos`: use `.and_utc().timestamp_subsec_nanos()` instead
  --> tests/by-util/test_touch.rs:37:59
   |
37 | ..._utc().timestamp(), tm.timestamp_subsec_nanos())
   |                           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: `coreutils` (test "tests") generated 1 warning

This commit fixes it.

When building coreutils I got the following deprecation warning:
```
warning: use of deprecated method `chrono::NaiveDateTime::timestamp_subsec_nanos`: use `.and_utc().timestamp_subsec_nanos()` instead
  --> tests/by-util/test_touch.rs:37:59
   |
37 | ..._utc().timestamp(), tm.timestamp_subsec_nanos())
   |                           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: `coreutils` (test "tests") generated 1 warning
```
This commit fixes it.
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

Thanks to Sylvestre!

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
@cakebaker cakebaker merged commit 4a64337 into uutils:main Mar 30, 2024
60 of 62 checks passed
@cakebaker
Copy link
Contributor

Thanks for your PR :)

@mvo5 mvo5 deleted the fix-deprecated-timestamp_subsec_nanos branch March 30, 2024 13:14
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.

3 participants