pgsql: timestamptz_trunc() should only recalculate the timezone when

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: timestamptz_trunc() should only recalculate the timezone when
Date: 2004-11-01 22:00:39
Message-ID: 20041101220039.0E16B3A46CD@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
timestamptz_trunc() should only recalculate the timezone when truncating
to DAY precision or coarser; leave the timezone alone when precision is
HOUR or less. This avoids surprises for inputs near a DST transition
time, as per example from Matthew Gabeler-Lee. (The only reason we
recalculate at all is so that outputs that are supposed to represent
days will come out as local midnight, and that's not relevant for sub-day
precision.)

Modified Files:
--------------
pgsql/src/backend/utils/adt:
timestamp.c (r1.113 -> r1.114)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c.diff?r1=1.113&r2=1.114)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Devrim GUNDUZ 2004-11-01 22:35:54 Re: [COMMITTERS] pgsql: timestamptz_trunc() should only recalculate
Previous Message Tom Lane 2004-11-01 21:34:48 pgsql: Invent pg_next_dst_boundary() and rewrite

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2004-11-01 22:03:58 Re: [PERFORM] [PATCHES] ARC Memory Usage analysis
Previous Message Andrew Dunstan 2004-11-01 21:48:02 windows compile warnings