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,
The simple way to do this is to create new Time using the previous one and only assigning the year month and day. It would look like this;
Time
rounded := time.Date(toRound.Year(), toRound.Month(), toRound.Day(), 0, 0, 0, 0, toRound.Location())
here's a play example; https://play.golang.org/p/jnFuZxruKm