Edit: I have updated the question with code that highlights why the alleged duplicate's solution doesn't work for me
I am trying to take UTC (+0000) times and format them into local times (eastern time in my case) without hard coding any timezone offsets (as to avoid implementing dst correction).
I have the following code which demonstrates the problem I am having
package main
import (
"fmt"
"time"
)
func main() {
// Here I load the timezone
timezone, _ := time.LoadLocation("America/New_York")
// I parse the time
t, _ := time.Parse("Mon Jan 2 15:04:05 +0000 2006", "Tue Jul 07 10:38:18 +0000 2015")
// This looks correct, it's still a utc time
fmt.Println(t)
// 2015-07-07 10:38:18 +0000 UTC
// This seems to be fine - -4 hours to convert to est
t = t.In(timezone)
fmt.Println(t)
// 2015-07-07 06:38:18 -0400 EDT
// This prints 6:07am, completely incorrect as it should be 6:38am
fmt.Println(t.Format("Monday Jan 2, 3:01pm"))
// Tuesday Jul 7, 6:07am
}
(https://play.golang.org/p/e57slFhWFk)
So to me it seems that it parses and converts timezones fine, but when I output it using format, it gets rid of the minutes and uses 07. It doesn't matter what I set the minutes to, it always comes out as 07.