You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
strftime (in jq) is documented to always format times in the UTC time zone. However, if %Z is part of the format, will be replaced with the systems local time zone, which is inconsistent with the rest of the time formatting, resulting in unexpected outputs
Describe the bug
strftime (in jq) is documented to always format times in the UTC time zone. However, if %Z is part of the format, will be replaced with the systems local time zone, which is inconsistent with the rest of the time formatting, resulting in unexpected outputs
To Reproduce
$ echo '1661932759' | TZ="Europe/Zurich" jq '. | strflocaltime("%Y-%m-%dT%H:%M:%S_%Z"), strftime("%Y-%m-%dT%H:%M:%S_%Z")'
"2022-08-31T09:59:19_CET"
"2022-08-31T07:59:19_CET"
Note: the output is very misleading... the time passed in is NOT 07:59:18 CET
Expected behavior
$ echo '1661932759' | TZ="Europe/Zurich" jq '. | strflocaltime("%Y-%m-%dT%H:%M:%S_%Z"), strftime("%Y-%m-%dT%H:%M:%S_%Z")'
"2022-08-31T09:59:19_CET"
"2022-08-31T07:59:19_UTC"
Note: the second line correct shows that the printed time is in UTC
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: