jq,locale和strptime:如何正确使用

时间:2017-12-29 11:24:46

标签: json locale jq

我有这个输入

{"text": "05 april 2017"}

如果我运行echo '{"text": "05 april 2017"}' | jq '.text|strptime("%d %B %Y")'我的结果是正确的。

如果我使用export LC_ALL=it_IT.utf8在意大利语中设置临时我的语言环境并将.text|strptime("%d %B %Y")应用于

{"text": "05 aprile 2017"}

我有date "05 aprile 2017" does not match format "%d %B %Y"

使用jq管理日期本地化设置以识别月份本地名称?

谢谢

1 个答案:

答案 0 :(得分:2)

此问题似乎有一个打开的错误。 https://github.com/stedolan/jq/issues/1740

当前(在v1.6中),日期功能不支持本地化。

相关问题