Is there a function in shell that converts date from one format to another.
For eg. I want to convert the following PST
to CST
2016-11-30 15:55:10-08:00
to
2016-11-30 17:55:10-06:00
Is there a function in shell that converts date from one format to another.
For eg. I want to convert the following PST
to CST
2016-11-30 15:55:10-08:00
to
2016-11-30 17:55:10-06:00
Copyright © 2021 Jogjafile Inc.
Not in shell per se, but there is dateutils and with that it's trivial:
The actual zone names (following
-z
) should be the ones you installed in /usr/share/zoneinfo/, so equivalently you could use:Disclaimer: I am the author of the package.