reintentar que se mande bien

This commit is contained in:
Cat /dev/Nulo 2023-07-17 11:37:04 -03:00
parent 967006965e
commit 0c94125978

View file

@ -43,7 +43,7 @@ const timezoneOffset = -3
func cycle() {
now := time.Now()
lastWeek := now.Add(-time.Hour*24*time.Duration(now.Weekday()-time.Monday) + 8 - timezoneOffset)
if now.Weekday() > time.Sunday {
if now.Weekday() > time.Sunday && now.Add(time.Hour*timezoneOffset).After(lastWeek) {
err := createIfNotExists(lastWeek.Format("semana 2006-01-02"))
if err != nil {
log.Fatalln(err)