mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-20 16:56:02 +00:00
Add a function to assist converting timestamps to iCalendar format, as at
UTC.
This commit is contained in:
parent
9ebdbde29e
commit
e21580f983
@ -250,3 +250,9 @@ BEGIN
|
||||
RETURN '''';
|
||||
END;
|
||||
' LANGUAGE 'plpgsql' IMMUTABLE STRICT;
|
||||
|
||||
|
||||
-- Function to convert a PostgreSQL date into UTC + the format used by iCalendar
|
||||
CREATE or REPLACE FUNCTION to_ical_utc( TIMESTAMP WITH TIME ZONE ) RETURNS TEXT AS '
|
||||
SELECT to_char( $1 at time zone ''UTC'', ''YYYYMMDD"T"HH24MISS"Z"'' )
|
||||
' LANGUAGE 'sql' IMMUTABLE STRICT;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user