reintentar que se mande bien
This commit is contained in:
parent
967006965e
commit
0c94125978
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue