mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-01 13:52:20 +00:00
16 lines
294 B
Go
16 lines
294 B
Go
package gomastodonstats
|
|
|
|
import (
|
|
"log"
|
|
"time"
|
|
)
|
|
|
|
func getStartofDay() time.Time {
|
|
localTime, err := time.LoadLocation(TIMEZONE)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
t := time.Now().In(localTime)
|
|
year, month, day := t.Date()
|
|
return time.Date(year, month, day, 0, 0, 0, 0, t.Location())
|
|
}
|