golang get the next day 00:00:00 timestamp

Viewed 83

I encounter one question, the best way to get next day 00:00:00 timestamp in golang.Here is my solution:

currentTime := time.Now()
nextDayTimestamp := time.Date(currentTime.Year(), currentTime.Month(), currentTime.Day()+1, 0, 0, 0, 0, currentTime.Location())

Is there any better solution?

0 Answers
Related