From 42a4e32daca13b518e64e5821080ff3d6adf0e39 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 26 Jan 2026 16:49:44 -1000 Subject: Use configured timezone throughout codebase - Add config/timezone.go with timezone utilities: - SetDisplayTimezone(), GetDisplayTimezone() - Now(), Today() - current time/date in display TZ - ParseDateInDisplayTZ(), ToDisplayTZ() - parsing helpers - Initialize timezone at startup in main.go - Update all datetime logic to use configured timezone: - handlers/handlers.go - all time.Now() calls - handlers/timeline.go - date parsing - handlers/timeline_logic.go - now calculation - models/atom.go - ComputeUIFields() - models/timeline.go - ComputeDaySection() - api/plantoeat.go - meal date parsing - api/todoist.go - due date parsing - api/trello.go - due date parsing This ensures all dates/times display correctly regardless of server timezone setting. Co-Authored-By: Claude Opus 4.5 --- internal/api/interfaces.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/api/interfaces.go') diff --git a/internal/api/interfaces.go b/internal/api/interfaces.go index 842814c..70bba1f 100644 --- a/internal/api/interfaces.go +++ b/internal/api/interfaces.go @@ -31,6 +31,7 @@ type TrelloAPI interface { // PlanToEatAPI defines the interface for PlanToEat operations type PlanToEatAPI interface { GetUpcomingMeals(ctx context.Context, days int) ([]models.Meal, error) + GetShoppingList(ctx context.Context) ([]models.ShoppingItem, error) GetRecipes(ctx context.Context) error AddMealToPlanner(ctx context.Context, recipeID string, date time.Time, mealType string) error } @@ -38,6 +39,7 @@ type PlanToEatAPI interface { // GoogleCalendarAPI defines the interface for Google Calendar operations type GoogleCalendarAPI interface { GetUpcomingEvents(ctx context.Context, maxResults int) ([]models.CalendarEvent, error) + GetEventsByDateRange(ctx context.Context, start, end time.Time) ([]models.CalendarEvent, error) } // Ensure concrete types implement interfaces -- cgit v1.2.3