Benedikt Spranger 15f304ab1c Fix handling of events started before 1900
commit 15d01c8bed2d ("Store DTSTART and DTEND from user in shadow columns")
breaks handling of events started before 1900:

[19-Sep-2023 14:30:39 UTC] davical: BUG: :DAViCal Fatal Error: [42804] SQLSTATE[42804]: Datatype mismatch: 7 ERROR:  column "dtstart_orig" is of type timestamp with time zone but expression is of type integer
[19-Sep-2023 14:30:39 UTC] ================= Stack Trace ===================
[19-Sep-2023 14:30:39 UTC] davical: LOG: :Response status 500 for PUT /<user>/home/6bb3a62b-43ae-4a21-bb83-fca84d9ef050.ics
[19-Sep-2023 14:30:39 UTC] davical: LOG: :***************** Response Header ****************
[19-Sep-2023 14:30:39 UTC] davical: LOG: headers:-->Server: 1.1
[19-Sep-2023 14:30:39 UTC] davical: LOG: headers:-->DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
[19-Sep-2023 14:30:39 UTC] davical: LOG: headers:-->DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
[19-Sep-2023 14:30:39 UTC] davical: LOG: headers:-->X-DAViCal-Version: DAViCal/1.1.12; DB/1.3.5
[19-Sep-2023 14:30:39 UTC] davical: LOG: headers:-->Content-type: text/plain; charset="utf-8"
[19-Sep-2023 14:30:39 UTC] davical: LOG: :******************** Response ********************
[19-Sep-2023 14:30:39 UTC] davical: LOG: response:-->DAViCal Fatal Error

Update dtstart_orig in these cases to avoid the database failure.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
2024-03-01 23:26:26 +13:00
..
2016-12-30 08:54:14 +01:00
2024-02-29 09:55:23 +13:00
2017-01-08 15:48:52 +01:00
2024-01-21 19:12:42 +13:00