mirror of
https://github.com/aunefyren/wrapperr
synced 2024-12-13 21:02:28 +00:00
Fixed cache date matching bug
This commit is contained in:
parent
c0e1fa570f
commit
c0aefae880
1 changed files with 2 additions and 7 deletions
|
@ -256,17 +256,12 @@ func WrapperrDownloadDays(ID int, wrapperr_data []WrapperrDay, loop_interval int
|
||||||
var found_date_index int = 0
|
var found_date_index int = 0
|
||||||
for j := 0; j < len(wrapperr_data); j++ {
|
for j := 0; j < len(wrapperr_data); j++ {
|
||||||
|
|
||||||
loc, err := time.LoadLocation(config.Timezone)
|
time_temp, err := time.Parse("2006-01-02", wrapperr_data[j].Date)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
time_temp, err := time.ParseInLocation("2006-01-02", wrapperr_data[j].Date, loc)
|
if time_temp.Format("2006-01-02") == loop_time.Format("2006-01-02") {
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if time_temp.Equal(loop_time) {
|
|
||||||
found_date_index = j
|
found_date_index = j
|
||||||
found_date = true
|
found_date = true
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue