Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 79FE947611C for ; Thu, 20 Jun 2002 20:30:14 -0400 (EDT) Received: from pugsly.m1group.com.au (unknown [144.135.2.168]) by postgresql.org (Postfix) with ESMTP id 672E74774D5 for ; Thu, 20 Jun 2002 19:04:20 -0400 (EDT) Received: from scooby.m1group.com.au ([192.168.100.96]) by pugsly.m1group.com.au (8.11.2/8.11.0) with SMTP id g5KMrb529302; Fri, 21 Jun 2002 06:53:37 +0800 From: Aaron Spiteri Date: Thu, 20 Jun 2002 23:00:49 GMT Message-ID: <20020620.23004900@scooby.m1group.com.au> Subject: Re: time stamp To: Felipe Nascimento , pgsql-admin@postgresql.org In-Reply-To: References: X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Linux) X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary= "------------=_4D4800896764085010A8" Content-Transfer-Encoding: 7bit X-Archive-Number: 200206/161 X-Sequence-Number: 4595 --------------=_4D4800896764085010A8 Content-Description: filename="text1.txt" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Interesting point.=20 Original Message dated 21/06/02, 4:31:39 Author: Felipe Nascimento Re: Re: [ADMIN] time stamp : I used to manage a database without Time Zone. Now I use PG, and this=20 concept of using Time Zone in date data is new to me. I find it=20 intersting, but I have the following doubt: let's imagine that my server resides in Time Zone(TZ) "-00", and one user= =20 resides in TZ "-05". Let=B4s say that 12p.m. to the user is 3p.m. to the=20 server, on the same day. Let's say that the user inputs a date for a business meeting: "2002-06-20= =20 12:00:00". The server will save "2002-06-20 12:00:00-00"?? If my=20 application sends an e-mail for the user reminding him of the meeting one= =20 hour befor it, the server will send that email at 11 o'clock (server=20 time) that is 2 o'clock to the user, that means, after the meeting. My question is: how to manage this so I can send the email to the user at= =20 his 11 o'clock (8 a.m. server time)???=20 Tks=20 Felipe Nascimento=20 -----Original Message-----=20 From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 Sent: quinta-feira, 20 de junho de 2002 13:49=20 To: nimeshb=20 Cc: Brian McCane; pgsql-admin@postgresql.org=20 Subject: Re: [ADMIN] time stamp=20 "nimeshb" writes:=20 > CREATE TABLE test (ts TIMESTAMP WITHOUT TIME ZONE) ; doesn't work.=20 Oh? I get=20 test72=3D# CREATE TABLE test (ts TIMESTAMP WITHOUT TIME ZONE) ;=20 CREATE=20 test72=3D# insert into test values(now());=20 INSERT 803798 1=20 test72=3D# insert into test values('2002-02-22 12:34:56');=20 INSERT 803799 1=20 test72=3D# select * from test;=20 ts=20=20=20=20=20=20=20=20=20=20=20=20=20 ----------------------------=20 2002-06-20 12:46:47.030269=20 2002-02-22 12:34:56=20 (2 rows)=20 test72=3D# select version();=20 version=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ---------------------------------------------------------------=20 PostgreSQL 7.2.1 on hppa-hp-hpux10.20, compiled by GCC 2.95.3=20 (1 row)=20 regards, tom lane=20 ---------------------------(end of broadcast)---------------------------=20 TIP 3: if posting/reading through Usenet, please send an appropriate=20 subscribe-nomail command to majordomo@postgresql.org so that your=20 message can get through to the mailing list cleanly=20 --------------=_4D4800896764085010A8 Content-Description: filename="text1.html" Content-Type: text/html Content-Transfer-Encoding: quoted-printable Re: [ADMIN] time stamp

Interesting point.=20


Original Message dated 21/06/02, 4:31:39

Author: Felipe Nascimento <Felipe.Nascimento@multivalor.com.br>

Re: Re: [ADMIN] time stamp :




I used to manage a database without Time Zone. Now I use PG, and this concept of using Time Zone in date data is new to me. I find it intersting, but I have the following doubt:

let's imagine that my server resides in Time Zone(TZ) "-00", and one user resides in TZ "-05". Let´s say that 12p.m. to the user is 3p.m. to the server, on the same day.=

Let's say that the user inputs a date for a business meeting: "2002-06-20 12:00:00". The server will save "2002-06-20 12:00:00-00"?? If my application sends an e-mail for the user reminding him of the meeting one hour befor it, the server will send that email at 11 o'clock (server time) that is 2 o'clock to the user, that means, after the meeting.

My question is: how to manage this so I can send the email to the user at his 11 o'clock (8 a.m. server time)???=20

Tks
Felipe Nascimento=20



-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us= ]
Sent: quinta-feira, 20 de junho de 2002 13:49
To: nimeshb
Cc: Brian McCane; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] time stamp



"nimeshb" <nimeshb@syscon-intl.com> writes:
> CREATE TABLE test (ts TIMESTAMP WITHOUT TIME ZONE) ; doesn't work.=20

Oh?  I get=20

test72=3D# CREATE TABLE test (ts TIMESTAMP WITHOUT TIME ZONE) ;
CREATE
test72= =3D# insert into test values(now());
INSERT 803798 1
test72=3D# insert into test values('2002-02-22 12:34:56');
INSERT 803799 1
test72=3D# select * from test;
     = ;        ts            
----------------------------
 2002-06-20 12:46:47.030269
 2002-02-22 12:34:56
(2 rows)=20

test72=3D# select version();
         &n= bsp;            = ;      version           &n= bsp;            = ;   
-------------------------------------------------= --------------
 PostgreSQL 7.2.1 on hppa-hp-hpux10.20, compiled by GCC 2.95.3
(1 row)=20



             = ;           regards, tom lane=20

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly=20

--------------=_4D4800896764085010A8--