diff options
Diffstat (limited to 'internal/api/plantoeat.go')
| -rw-r--r-- | internal/api/plantoeat.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/api/plantoeat.go b/internal/api/plantoeat.go index 5c24cc1..ab5d2cd 100644 --- a/internal/api/plantoeat.go +++ b/internal/api/plantoeat.go @@ -11,6 +11,7 @@ import ( "github.com/PuerkitoBio/goquery" + "task-dashboard/internal/config" "task-dashboard/internal/models" ) @@ -90,8 +91,7 @@ func parsePlannerHTML(body io.Reader, days int) ([]models.Meal, error) { } var meals []models.Meal - now := time.Now() - today := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location()) + today := config.Today() endDate := today.AddDate(0, 0, days) // PlanToEat structure: @@ -108,7 +108,7 @@ func parsePlannerHTML(body io.Reader, days int) ([]models.Meal, error) { return } - mealDate, err := time.Parse("2006-01-02", dateStr) + mealDate, err := config.ParseDateInDisplayTZ(dateStr) if err != nil { return } |
