Parsing Dates in Go
Here’s the playground
Sometimes you have the local time in a string, and you need to convert it to other time zones. For example, I had the string “2016-12-20 11:57:34” in my local timezone “America/New_York” and I want to convert it to “America/Los_Angeles” and “UTC”.
The above command will handle this. The full program is shown below. It’s probably easier to just run this from the playground.