X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AD450475A80 for ; Fri, 14 Feb 2003 13:00:55 -0500 (EST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 763AC474E61 for ; Fri, 14 Feb 2003 13:00:53 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id DC70FD6BC; Fri, 14 Feb 2003 10:00:52 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id D21625C11; Fri, 14 Feb 2003 10:00:52 -0800 (PST) Date: Fri, 14 Feb 2003 10:00:52 -0800 (PST) From: Stephan Szabo To: Jeff Boes Cc: Subject: Re: Timezone conversion In-Reply-To: Message-ID: <20030214095723.V63977-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/339 X-Sequence-Number: 11737 On Thu, 13 Feb 2003, Jeff Boes wrote: > Is there a straightforward way to change the display of a time to another > timezone? For example, my server's environment is EST (-0500); I want to > convert timestamps for display in PST (-0800). What I've been doing is to use a > Pl/Pgsql function to subtract the current timezone-offset and add in the desired > one. Is there a way to do it without arithmetic? I think you might be able to use "AT TIME ZONE" to do what you want. I think it's described in Chapter 6 of the user's guide.