-
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
Missing handling of locale-dependent format for strftime/strflocaltime and strptime #1740
Comments
Looking at the source code I noticed the absence of calls to |
hi @trantor jq-version: master
|
Well that's what locale-dependent format in the bug description means ;-) . |
Not familiar with $ date -u +"%Y-%m-%d %H:%M:%S %Z"
2022-02-22 03:28:57 UTC
$ jq -nr 'now | strftime("%Y-%m-%d %H:%M:%S %Z")'
2022-02-22 03:28:58 JST |
@itchyny @nicowilliams I have not checked, but was this, by chance, handled by recent commits? |
@itchyny @nicowilliams I have not checked, but was this, by chance, handled by recent commits?
Can you check #2863?
|
@nicowilliams I compiled your branch |
Thanks a lot @nicowilliams ❤️ |
Description
Using a "it_IT.UTF-8" locale, the output of the strftime/strflocaltime function in jq differs from the output of the date command in the same environment
To Reproduce
Generate a non-English locale, export the appropriate variables and run the commands above.
Expected behavior
For jq to output/parse dates using the correct representation of names according to the current locale
Environment (please complete the following information):
Additional context
jq compiled from the latest tree
Using the version shipped with the distro (only with strftime) gives the same output.
The text was updated successfully, but these errors were encountered: