Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 0231347604B for ; Tue, 4 Jun 2002 07:17:45 -0400 (EDT) Received: from hotmail.com (oe43.law4.hotmail.com [216.33.148.80]) by postgresql.org (Postfix) with ESMTP id 6A86F475DBF for ; Tue, 4 Jun 2002 07:16:33 -0400 (EDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 4 Jun 2002 04:16:36 -0700 X-Originating-IP: [212.9.66.13] From: "Areski Belaid" To: References: <3CCE936B.245D870C@juliana-multimedia.com> <200204301522.44037.jm.poure@freesurf.fr> <3CCECCD8.A11B8F8C@juliana-multimedia.com> <1022941995.3cf8db2b32686@webmail.acucore.com> Subject: Incompatibility Postgres 7.1 - Postgres 7.2.1 Date: Tue, 4 Jun 2002 13:16:31 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 04 Jun 2002 11:16:36.0320 (UTC) FILETIME=[4A4CD600:01C20BB9] X-Archive-Number: 200206/6 X-Sequence-Number: 1259 ----- Original Message ----- From: "Dan Wilson" To: "Areski Belaid" Cc: Sent: Saturday, June 01, 2002 4:33 PM Subject: Re: [PHP] Incompatibility Postgres 7.1 - Postgres 7.3 > Postgres has two different timestamp types now. There is "timestamp with > timezone" and "timestamp without timezone". Internally the "with timezone" is > stored as timestamptz. And by default, a timestamp will have a timezone. You > can think of timestamptz as the same as timestamp. > > So there is really not a problem here unless you wanted a "timestamp without > timezone". If this is the case, currently phpPgAdmin doesn't provide for the > creation of timestamp without timezone through the table create > functionality. You will have to do it manually through the "Run SQL" box in > the DB Details page. > > -Dan > > Quoting Areski Belaid : > > > Someone can help me .... > > > > I have a compatibility problem between Postgres 7.1 - Postgres 7.3... > > Guess !!! It's --- timestamptz --- > > > > When I create a field with timestamp type... the new postgresql replace that > > by > > timestamptz.... I use phpPgAdmin, I don't know where is from the problem... > > > > Simple example, If I execute that : > > CREATE TABLE "statistic" ( > > "Id" int4 NOT NULL, > > "DATE" timestamp); > > > > I shall have that on the database: > > CREATE TABLE "statistic" ( > > "Id" int4 NOT NULL, > > "DATE" timestamptz); > > > > Grrrrrr, =) > > > > Helpsssssss, Areski > > It's working if I introduce the sql command directly in the shell... CREATE TABLE "statistic" ( "Id" int4 NOT NULL, "DATE" timestamp without time zone); One thing good, but I just realize That my problem isn't coming of the time zone BUT of the precision... EXAMPLE: If I want know the number of day between two date ($lastdate - $firstdate)... Value of firstdate = 2002-05-31 12:27:05.121201 Value of lastdate = 2002-06-04 12:29:25.147232 $oneday = 60*60*24*1; $number_day_between_two_date = intval(( strtotime($lastdate) - strtotime($firstdate) )/$oneday); I did that and It' was working without problem before the upgrate of postgres (Postgres 7.1 - Postgres 7.2.1) Someone have a idea... What I can do to know the number of day between two date... Areski'ch