2

I have this input

{"text": "05 april 2017"}

If I run echo '{"text": "05 april 2017"}' | jq '.text|strptime("%d %B %Y")' I have the right result.

If I set temporary my locale in italian with export LC_ALL=it_IT.utf8 and apply .text|strptime("%d %B %Y") to

{"text": "05 aprile 2017"}

I have date "05 aprile 2017" does not match format "%d %B %Y".

Ho to manage date localization settings with jq to recognize months local name?

Thank you

aborruso
  • 4,938
  • 3
  • 23
  • 40

1 Answers1

2

It looks like there is a bug open for this issue. https://github.com/stedolan/jq/issues/1740

Currently (in v1.6), localization is not supported for date functionality.

bbbco
  • 1,508
  • 1
  • 10
  • 25