A newsletter defined as yesterday in Vienna has a local calendar boundary. Subtracting 24 hours from the current timestamp can miss an hour or pull in an extra one when the clocks change.
Define the issue in local dates
Choose an IANA time zone such as Europe/Vienna. Construct local midnight at the start of the target date and local midnight at the start of the following date, then convert each endpoint to UTC.
Use a half-open time window
Include publication timestamps at or after the UTC start and strictly before the UTC end. Store the local date and zone in the issue key. An item exactly at the end belongs in the following issue.
Test both clock changes
Create sample entries immediately before and after each boundary during the spring and autumn transitions. Verify each appears once. Put late-arriving entries in a separately labelled catch-up section if your policy allows it.
from datetime import date, datetime, time, timedelta, timezone
from zoneinfo import ZoneInfo
day = date(2026, 10, 25)
zone = ZoneInfo("Europe/Vienna")
start = datetime.combine(day, time.min, zone).astimezone(timezone.utc)
end = datetime.combine(day + timedelta(days=1), time.min, zone).astimezone(timezone.utc)
print(start.isoformat(), end.isoformat()) # This local day spans 25 hours.