mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-01 22:02:20 +00:00
Check day
This commit is contained in:
parent
9b3b22b743
commit
5a073e5232
1 changed files with 5 additions and 1 deletions
|
@ -26,7 +26,11 @@ func Run() {
|
|||
sendToMatrix(updatedMetrics)
|
||||
|
||||
// Only post weekly here
|
||||
weekday := time.Now().Weekday()
|
||||
localTime, err := time.LoadLocation(TIMEZONE)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
weekday := time.Now().Local().In(localTime).Weekday()
|
||||
if weekday == time.Monday {
|
||||
postToMastodon(updatedMetrics)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue