Skip to content

Commit

Permalink
AE-2274: Put now into Helsinki's timezone in expiration comparsions
Browse files Browse the repository at this point in the history
  • Loading branch information
solita-juhohaa committed Oct 16, 2024
1 parent 8dbf9b1 commit 46256bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ from energiatodistus
from vo_toimenpide
group by energiatodistus_id) latest_toimenpide
on energiatodistus.id = latest_toimenpide.energiatodistus_id
where voimassaolo_paattymisaika < current_date
and (latest_toimenpide_create_time < current_date - interval '2 years'
where voimassaolo_paattymisaika < (now() at time zone 'Europe/Helsinki')::date - interval '1 days'
and (latest_toimenpide_create_time < (now() at time zone 'Europe/Helsinki')::date - interval '2 years'
or latest_toimenpide_create_time is null);

-- name: select-vo-toimenpiteet-by-energiatodistus-id
Expand Down

0 comments on commit 46256bb

Please sign in to comment.