Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tests: fix deprecation warning timestamp_subsec_nanos()#6149

Merged
cakebaker merged 2 commits intouutils:mainfrom
mvo5:fix-deprecated-timestamp_subsec_nanos
Mar 30, 2024
Merged

tests: fix deprecation warning timestamp_subsec_nanos()#6149
cakebaker merged 2 commits intouutils:mainfrom
mvo5:fix-deprecated-timestamp_subsec_nanos

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.
@github-actions
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 <[email protected]>
@cakebaker cakebaker merged commit 4a64337 into uutils:main Mar 30, 2024
@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

Comments