Comment (by Stefan de Konink):
Was able to figure out the difference in the connection setup between
psycopg2 native and Django. The latter applied {{{set time zone 'utc';}}}
when setting up the connection. That rules out that Django itself is the
problem.
{{{
blxa=> select * from myview ;
id | scheduled | exact_schedule_id |
negative_schedule_id
------------+---------------------+-------------------+----------------------
1647824400 | 2022-03-21 01:00:00 | 1 |
1
1647824400 | 2022-03-21 01:00:00 | 1 |
1
1647824400 | 2022-03-21 01:00:00 | 1 |
1
(3 rows)
blxa=> set time zone 'utc';
SET
blxa=> select * from myview ;
id | scheduled | exact_schedule_id |
negative_schedule_id
------------+---------------------+-------------------+----------------------
1647824400 | 2022-03-21 01:00:00 | 1 |
0
(1 row)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33590#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/33590#comment:9>
Comment (by Stefan de Konink):
My "solution" has been to {{{select ((expanded::date + time::time) at time
zone 'Europe/Amsterdam')::timestamptz as scheduled}}} manually set the
timezone.
--
Ticket URL: <https://code.djangoproject.com/ticket/33590#comment:10>