HomeSoftware Heritage

grab_next_visits: avoid time interval calculations in PostgreSQL

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

grab_next_visits: avoid time interval calculations in PostgreSQL

When the database is in a non-UTC timezone with DST, and a `timestamptz

  • interval` calculation crosses a DST change, the result of the

calculation can be one hour off from the expected value:

PostgreSQL will vary the timestamp by the amount of days in the
interval, and will keep the same (local) time, which will be offset by
an hour because of the DST change.

Doing the datetime +- timedelta calculations in Python instead of
PostgreSQL avoids this caveat altogether.

Details

Provenance
olasdAuthored on Oct 27 2021, 3:45 PM
olasdPushed on Oct 27 2021, 4:04 PM
Differential Revision
D6563: grab_next_visits: avoid time interval calculations in PostgreSQL
Build Status
Buildable 24739
Build 38615: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.