StartOfDay returns the first timestamp of the day of the input timestamp in its location.
(t time.Time)
| 19 | |
| 20 | // StartOfDay returns the first timestamp of the day of the input timestamp in its location. |
| 21 | func StartOfDay(t time.Time) time.Time { |
| 22 | year, month, day := t.Date() |
| 23 | return time.Date(year, month, day, 0, 0, 0, 0, t.Location()) |
| 24 | } |