Check day

This commit is contained in:
idanoo 2023-02-13 08:09:54 +13:00
parent 9b3b22b743
commit 5a073e5232
Signed by: idanoo
GPG key ID: 387387CDBC02F132

View file

@ -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)
}