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
2024-01-21 19:12:42 +13:00
2018-01-11 23:43:25 +01:00
2011-02-21 22:44:57 +13:00
2024-01-21 19:12:42 +13:00
2024-02-17 02:25:25 +00:00
2010-12-25 14:24:44 +13:00
2023-03-13 22:00:55 +01:00
2023-03-13 22:00:55 +01:00
2017-01-08 15:48:52 +01:00
2010-01-11 10:15:47 +13:00
2023-03-13 22:00:55 +01:00

DAViCal CalDAV Server by Andrew McMillan.

For documentation you are best advised to visit the DAViCal
website at https://www.davical.org/ or search our general mailing
list at https://lists.sourceforge.net/mailman/listinfo/davical-general

There's lots of useful information at https://wiki.davical.org/ as well,
and if you want access to update that contact us on IRC (#davical on OFTC,
be patient and stick around for a while) or send an e-mail
to <wiki-access@davical.org>.

Good luck!

Andrew McMillan

-----------------------------------------------
Copyright: 2006-2011 Andrew McMillan <andrew@mcmillan.net.nz>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA
Description
DAViCal is a server for calendar sharing. It is an implementation of the CalDAV protocol which is designed for storing calendaring resources (in iCalendar format) on a remote shared server.
Readme
Languages
PHP 71%
PLpgSQL 13.2%
Perl 11.7%
Shell 2%
Prolog 0.6%
Other 1.5%