Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id BD4FE47666A for ; Fri, 21 Jun 2002 11:30:38 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id B0C18477079 for ; Fri, 21 Jun 2002 11:14:05 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g5LFE3119880; Fri, 21 Jun 2002 11:14:03 -0400 (EDT) To: Felipe Nascimento Cc: pgsql-admin@postgresql.org Subject: Re: time stamp In-reply-to: References: Comments: In-reply-to Felipe Nascimento message dated "Fri, 21 Jun 2002 11:25:52 -0300" Date: Fri, 21 Jun 2002 11:14:02 -0400 Message-ID: <19877.1024672442@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200206/168 X-Sequence-Number: 4602 Felipe Nascimento writes: > let's imagine that my server resides in Time Zone(TZ) "-00", and one user > resides in TZ "-05". Let=B4s 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"?? No, it won't. If the user has TimeZone set to -05, as he should, then his input of '2002-06-20 12:00:00' will be read as '2002-06-20 12:00:00-05'. And it will be displayed to him that way. But if someone else who has TimeZone set differently looks at the stored value, it will be shown to them properly converted into their timezone. This all works exactly the same as ordinary Unix timekeeping --- in essence, everything is GMT inside the system, and rotation into a particular timezone happens on-the-fly when a timestamp value is entered or displayed. The TimeZone variable corresponds to the TZ environment variable of Unix. > 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 If you let the system do what it wants to do, it will do the right thing. regards, tom lane