I have a timestamp coming in, I wonder if there\'s a way to round it down to the start of a day in PST. For example, ts: 1305861602 corresponds to 2016-04-14,
1305861602
2016-04-14,
in addition to sticky's answer to get the local Truncate do like this
Truncate
t := time.Date(2015, 4, 2, 0, 15, 30, 918273645, time.Local) d := 24 * time.Hour fmt.Println("in UTC", t.Truncate(d)) _, dif := t.Zone() fmt.Println("in Local", t.Truncate(24 * time.Hour).Add(time.Second * time.Duration(-dif)))