Open itchyny opened 2 years ago
I was aware of this issue and difference with gojq. Though I ignored it while I was replacing chrono
with time
, since it going to be complicated, especially when it comes to %Z
, because of ambiguous timezone name and hardness of resolving timezone to offset....
But yeah, it'd be nice to support the feature. Though maybe we can only support %Z
for UTC
, GMT
and perhaps the one (or more) from the locale.
When this issue is resolved, it's useful if fromdateiso8601
supports timezone offsets. This is also reported to jq (https://github.com/stedolan/jq/issues/1053).
Currently xq can parse but ignores timezone offset in
strptime/1
. This is actually the same behavior of jq, but considered as a critical bug when we handle datetime with timezone offsets (ref: https://github.com/stedolan/jq/issues/929, https://github.com/stedolan/jq/issues/2195).