Using GNU date to convert between timezones

Written by James McDonald

January 1, 2021

Just being doing an AWS EC2 volume enlargement and the output of StartTime is in UTC

aws --profile gap ec2 describe-volumes-modifications --volume-id vol-XXXXXXXXXXXXXXXXXXXXX


    "VolumesModifications": [
            "VolumeId": "vol-XXXXXXXXXXXXXXXXXXXXX",
            "ModificationState": "optimizing",
            "TargetSize": 200,
            "TargetIops": 600,
            "TargetVolumeType": "gp2",
            "OriginalSize": 80,
            "OriginalIops": 240,
            "OriginalVolumeType": "gp2",
            "Progress": 52,
            "StartTime": "2021-01-01T01:06:48+00:00"

What is the local time for the “StartTime” value in the output of the aws cli command

GNU date command

Set the TZ environment variable to your timezone

TZ=Australia/Melbourne date -d "2021-01-01T01:06:48+00:00" -Iseconds




Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

Toggen builds a new website

So I have built and hosted a new website for Roger Clark Pest Management they are a family owned and operated Pest...


Just downloaded WizTree (not a sponsor) from It seems to do what it says on the tin which is...

Scam call from “Telstra”

Just had a call from a man with a sub-continental accent from caller ID 0734946596 Told me there was problem with my...