Something gets wrong …
The following command does not work (on macOS):
jq -c 'strptime("%H:%M")|mktime' <<< '"05:30"' # <- this will produce an error on macOS:
We need this little hack to fix the code above:
jq -c 'strptime("%H:%M")|[2021]+.[1:]|mktime|todate' <<< '"05:30"' # <- workaround to the code above
Let’s do some explanations:
jq -c '.[1:]' <<< '[0,1,2,3,4]'
jq -c '[2021]+.[1:]' tmp/strptime.json
!! | jq 'mktime|todate'