Skip to content

Conversation

simonprickett
Copy link
Contributor

@simonprickett simonprickett commented Feb 25, 2022

This should fix #2001 - issue with the TIME command returning a date in 1970. Also adds an example to show it working:

node-redis $ cd examples
examples $ node get-server-time.js
2022-02-25T12:55:41.000Z { microseconds: 130723 }

@simonprickett simonprickett self-assigned this Feb 25, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2022

Codecov Report

Merging #2008 (bb6be26) into master (ac7d50c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head bb6be26 differs from pull request most recent head ad5ed41. Consider uploading reports for the commit ad5ed41 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2008      +/-   ##
==========================================
+ Coverage   94.94%   94.95%   +0.01%     
==========================================
  Files         358      359       +1     
  Lines        3343     3350       +7     
  Branches      409      409              
==========================================
+ Hits         3174     3181       +7     
  Misses         85       85              
  Partials       84       84              
Impacted Files Coverage Δ
packages/client/lib/commands/BITFIELD.ts 100.00% <ø> (ø)
packages/client/lib/cluster/commands.ts 100.00% <100.00%> (ø)
packages/client/lib/commands/BITFIELD_RO.ts 100.00% <100.00%> (ø)
packages/client/lib/commands/TIME.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac7d50c...ad5ed41. Read the comment docs.

@leibale leibale merged commit 8858604 into master Mar 7, 2022
@leibale leibale deleted the fix-time-command-#2001 branch March 7, 2022 12:20
florian-schunk pushed a commit to florian-schunk/node-redis that referenced this pull request Jun 18, 2025
* Fixes the time command response.

* Adds TIME example.

* Update TIME.ts

* Update get-server-time.js

Co-authored-by: Leibale Eidelman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TIME() returning a date in 1970 rather than current timestamp

4 participants