-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Converting unix timestamps in milliseconds occurs Assertion failed! #2123
Comments
What's the result of |
|
Thank you. |
For a record, |
Edit
This bug was caused by too large a number. not strftime with "-R"
To Reproduce
ECHO {"published_at": 1461625253393} | jq ".published_at/1000 | strftime(\"%Y-%m-%d\")"
Converting unix timestamps in second works.
ECHO {"published_at": 1461625253393} | jq ".published_at | strftime(\"%Y-%m-%d\")"
But converting unix timestamps in milliseconds occurs unexpected type of error.
Expected behavior
jq should alart that the number is too big.
Environment (please complete the following information):
Wrong jq command with -R options and strftime occurs "Assertion failed!"
To Reproduce
echo {"updateTime":1589179644052} | jq -R "fromjson? | .updateTime | strftime(\"%B %d %Y\")"
Expected behavior
Jq should print "compile error" or "syntax error" or something else.
The text was updated successfully, but these errors were encountered: