diff --git a/internal/api/live_activities.go b/internal/api/live_activities.go index fd8b0d1..c732bef 100644 --- a/internal/api/live_activities.go +++ b/internal/api/live_activities.go @@ -30,7 +30,7 @@ func (a *api) createLiveActivityHandler(w http.ResponseWriter, r *http.Request) } la.RefreshToken = rtr.RefreshToken - la.TokenExpiresAt = time.Now().Add(1 * time.Hour).UTC() + la.TokenExpiresAt = time.Now().Add(1 * time.Hour) if err := a.liveActivityRepo.Create(ctx, la); err != nil { a.errorResponse(w, r, 500, err) diff --git a/internal/cmd/scheduler.go b/internal/cmd/scheduler.go index b7c9cea..0ad7019 100644 --- a/internal/cmd/scheduler.go +++ b/internal/cmd/scheduler.go @@ -149,7 +149,7 @@ func enqueueLiveActivities(ctx context.Context, logger *zap.Logger, pool *pgxpoo ctx, cancel := context.WithCancel(ctx) defer cancel() - now := time.Now().UTC() + now := time.Now() next := now.Add(domain.LiveActivityCheckInterval) stmt := `UPDATE live_activities diff --git a/internal/repository/postgres_live_activity.go b/internal/repository/postgres_live_activity.go index 78de83a..0eb0e7e 100644 --- a/internal/repository/postgres_live_activity.go +++ b/internal/repository/postgres_live_activity.go @@ -87,8 +87,8 @@ func (p *postgresLiveActivityRepository) Create(ctx context.Context, la *domain. la.TokenExpiresAt, la.ThreadID, la.Subreddit, - time.Now().UTC(), - time.Now().Add(domain.LiveActivityDuration).UTC(), + time.Now(), + time.Now().Add(domain.LiveActivityDuration), ).Scan(&la.ID) } diff --git a/internal/worker/live_activities.go b/internal/worker/live_activities.go index 25fa2e6..0ed24d9 100644 --- a/internal/worker/live_activities.go +++ b/internal/worker/live_activities.go @@ -138,7 +138,7 @@ func (lac *liveActivitiesConsumer) Consume(delivery rmq.Delivery) { ctx, cancel := context.WithCancel(lac) defer cancel() - now := time.Now().UTC() + now := time.Now() defer func() { elapsed := time.Now().Sub(now).Milliseconds() _ = lac.statsd.Histogram("apollo.consumer.runtime", float64(elapsed), []string{"queue:live_activities"}, 0.1)