I’m trying to parse a date that’s extracted via exiftool
from the metadata of MOV files. It comes in a format of e.g. 2024:05:31 20:57:23+03:00
. Even though GNU’s date
has the %:z
option, and it is able to produce a timestamp in such format, it’s unable to parse existing value of it:
# echo $creation_date
2024:05:31 20:57:23+03:00
# date "+%Y:%m:%d %H:%M:%S%:z"
2024:06:08 22:04:15+02:00
# date "+%Y:%m:%d %H:%M:%S%:z" -d "$creation_date"
date: invalid date ‘2024:05:31 20:57:23+03:00’
What am I missing here?