From b2b6548c79eb63faf1d0939893b3bf183d5410a1 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 30 Jul 2005 14:52:04 +0000 Subject: Please find attached diffs for documentation and simple regression tests for the new interval->day changes. I added tests for justify_hours() and justify_days() to interval.sql, as they take interval input and produce interval output. If there's a more appropriate place for them, please let me know. Michael Glaesemann --- doc/src/sgml/func.sgml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 5c6092e4245..55a5a63ae59 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -4903,6 +4903,24 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); such pair. + + When adding an interval value to (or subtracting an + interval value from) a timestamp with time zone + value, the days component advances (or decrements) the date of the + timestamp with time zone by the indicated number of days. + Across daylight saving time changes (with the session tiem zone set to a + time zone that recognizes DST), this means interval '1 day' + does not necessarily equal interval '24 hours'. + For example, with the session time zone set to CST7CDT + timestamp with time zone '2005-04-02 12:00-07' + interval '1 day' + will produce timestamp with time zone '2005-04-03 12:00-06', + while adding interval '24 hours' to the same initial + timestamp with time zone produces + timestamp with time zone '2005-04-03 13:00-06', as there is + a change in daylight saving time at 2005-04-03 02:00 in time zone + CST7CDT. + + Date/Time Operators -- cgit v1.2.3