X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 02A50475F25; Mon, 24 Feb 2003 20:52:57 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 30615-06; Mon, 24 Feb 2003 20:52:46 -0500 (EST) Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id 72241475D20; Mon, 24 Feb 2003 17:59:59 -0500 (EST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id h1ONS96P024099; Mon, 24 Feb 2003 18:28:10 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id h1OMxxp32120; Mon, 24 Feb 2003 18:00:00 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id F3HTH13B; Mon, 24 Feb 2003 17:59:58 -0500 Subject: Re: Date Return must be As per Natural Calander From: Robert Treat To: Aspire Something Cc: pgsql-admin@postgresql.org, pgsql-bugs@postgresql.org In-Reply-To: <001301c2db58$29f7b5e0$c9c832c0@societykotla> References: <001301c2db58$29f7b5e0$c9c832c0@societykotla> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 24 Feb 2003 17:59:59 -0500 Message-Id: <1046127599.1015.318.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/379 X-Sequence-Number: 7577 [rob@camel rms_db]$ cal 9 1752 September 1752 Su Mo Tu We Th Fr Sa 1 2 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 I guess adding 1 day to 1752-09-02 should give us 1752-09-14, but your right, it gives us 1752-09-03. Forwarding this to -bugs Robert Treat On Sun, 2003-02-23 at 11:22, Aspire Something wrote: > Hi all , > Please Permit me to recive ur valuable knowledge and experience :-) > > In the Postgresql Documentation (read it in /7.3.2/units-history.html) > it has been given that Postgresql follows the Julian calander (Which > indead is being used by my system by default ) > > So does it not mean when I add to a date (integer) it must return the > date as per the calendar : > > i.e > > The following sql statements > retuns date 1752-09-03 > insted of 1752-09-14 > you may do : > $cal 9 1752 > on unix promt to verify (Windows user sorry ur calendar may not show > dates <1970 !!! atleat mine does not ) > > select date('1752-09-02') + 1 as some_date ; > some_date > ------------ > 1752-09-03 > (1 row) > select date('1752-09-02') + interval'1 day' as some_day; > some_day > --------------------- > 1752-09-03 00:00:00 > (1 row) > > Now every thing above may sound stupid but if we in near future come > accross the same situation how will the data base respond when my > database relies 90% on the timestamp value > their will be total mismatch of calendar(Which people follow) and > database returning dates. > > Regards , > Aspire > > My Sys Config is > ================== > Red Hate 7.2 Kernel 2.4.7-10 on an i686 > Postgresql 7.3.2 > GCC 3.0.2 20010905 > ================= >