Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bce3K-0008Cj-2O for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Aug 2016 19:41:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bce3J-0001uG-DV for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Aug 2016 19:41:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bce2c-00017y-I3 for pgsql-bugs@postgresql.org; Wed, 24 Aug 2016 19:40:50 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bce2a-0008O7-74 for pgsql-bugs@postgresql.org; Wed, 24 Aug 2016 19:40:49 +0000 Received: from localhost ([127.0.0.1]:24997 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1bce2Y-000487-0Y; Wed, 24 Aug 2016 19:40:46 +0000 From: Andrew Gierth To: Tom Lane Cc: pablopumarino@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #14294: Problem in generate series between dates In-Reply-To: <28256.1472064660@sss.pgh.pa.us> (Tom Lane's message of "Wed, 24 Aug 2016 14:51:00 -0400") Message-ID: <87oa4i9d8w.fsf@news-spur.riddles.org.uk> References: <20160824182920.15681.52285@wrigleys.postgresql.org> <28256.1472064660@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Wed, 24 Aug 2016 20:40:45 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >>>>> "Tom" == Tom Lane writes: >> When I use postgres function: >> SELECT generate_series('2016-08-01', '2016-08-31', '1 >> day'::interval)::date >> it gives me the corresponding list of days but for some reason it misses the >> day 2016-08-31. Tom> In addition to Andrew's questions: Tom> * What time zone are you using? I discovered that this is reproducible in America/Santiago Tom> * In that zone, is there a DST rule change near 2016-08-31? The DST change seems to be at midnight local on 2016-08-14 (who puts their DST changes at midnight? that breaks things here) This _looks_ wrong: set timezone = 'America/Santiago'; select timestamptz '2016-08-13', timestamptz '2016-08-13' + interval '1 day'; timestamptz | ?column? ------------------------+------------------------ 2016-08-13 00:00:00-04 | 2016-08-14 01:00:00-03 (1 row) but I guess it's inevitable, since 2016-08-14 00:00:00 doesn't exist in the local time, so there's no other possible result to return. -- Andrew (irc:RhodiumToad) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs