I would like to format the date in bash in a script.
The format is: 2016-10-05T12:18:36.890+02:00
I'm currently using:
Any idea how this can be done?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
What you are looking is to format date into ISO 8601 format.
I for ISO format,
s for datetime.
$ date +%FT%T.%3N%:z 2017-06-30T13:00:54.566+01:00
You can try this one: