Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 741E647653A for ; Thu, 20 Jun 2002 18:26:40 -0400 (EDT) Received: from mceahern.com (unknown [216.26.162.8]) by postgresql.org (Postfix) with ESMTP id 94068475C5D for ; Thu, 20 Jun 2002 17:37:34 -0400 (EDT) Received: from LAPMARK [64.109.30.40] by mceahern.com with ESMTP (SMTPD32-7.10) id AB1CDBC0030; Thu, 20 Jun 2002 17:37:32 -0400 From: "Mark McEahern" To: Subject: Re: time stamp Date: Thu, 20 Jun 2002 16:37:18 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: Importance: Normal X-Archive-Number: 200206/160 X-Sequence-Number: 4594 To be fair, you really ought to ask this question: Suppose user A sets up a conference call with users B, C, and D, who each live in: A: Tokyo B: Denver C: San Diego D: New York The meeting is to occur at 1:00 PM tokyo time. (Never mind for now whether that makes any sense.) Trick questions: 1. How does the database store the time of the meeting? 2. What if user D is traveling to London at the time of the meeting? She changes her locale on her computer to London time, will the database show her the correct time? However you solve this problem, it's not going to be by naively storing user A's local time with no time zone information and leaving it at that. ;-) // m -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Felipe Nascimento Sent: Thursday, June 20, 2002 1:32 PM To: pgsql-admin@postgresql.org Subject: 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)??? Tks Felipe Nascimento -----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" writes: > CREATE TABLE test (ts TIMESTAMP WITHOUT TIME ZONE) ; doesn't work. Oh? I get test72=# CREATE TABLE test (ts TIMESTAMP WITHOUT TIME ZONE) ; CREATE test72=# insert into test values(now()); INSERT 803798 1 test72=# insert into test values('2002-02-22 12:34:56'); INSERT 803799 1 test72=# select * from test; ts ---------------------------- 2002-06-20 12:46:47.030269 2002-02-22 12:34:56 (2 rows) test72=# select version(); version --------------------------------------------------------------- PostgreSQL 7.2.1 on hppa-hp-hpux10.20, compiled by GCC 2.95.3 (1 row) regards, tom lane ---------------------------(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 -