I am plucking an ISO8601 variable "$sunrise" from an API. Now I'd like to convert it to the local time. I have the $timeZone (America/Denver style) also as a variable.
An ISO8601 time stamp looks like this: 2019-11-09T11:36:14+00:00
I'd like a people friendly time in local time zone. This will be sunrise.
I have tried every combination in a script I can think of like this:
TZ="$timeZone" newSunrise=echo $date -d "$sunrise" +"%s"
I can't get it to work. Will someone please give me a hand?