mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-01 22:02:20 +00:00
Initial Commit
This commit is contained in:
commit
4e9199bf3e
12 changed files with 267 additions and 0 deletions
16
internal/gomastodonstats/utils.go
Normal file
16
internal/gomastodonstats/utils.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
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())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue