X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 37115D1BBB0 for ; Mon, 29 Dec 2003 22:05:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 94356-01 for ; Mon, 29 Dec 2003 18:04:42 -0400 (AST) Received: from polaris.pinpointresearch.com (66-7-238-130.cust.telepacific.net [66.7.238.130]) by svr1.postgresql.org (Postfix) with ESMTP id AA0D7D1B440 for ; Mon, 29 Dec 2003 18:02:49 -0400 (AST) Received: from betelgeuse.pinpointresearch.com (betelgeuse.pinpointresearch.com [192.168.1.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id 33A60FE0A; Mon, 29 Dec 2003 14:02:36 -0800 (PST) From: Steve Crawford Organization: Pinpoint Research To: "Seader, Cameron" , pgsql-php@postgresql.org Subject: Re: SQL convert UTC to MST Date: Mon, 29 Dec 2003 14:02:35 -0800 User-Agent: KMail/1.5.1 References: <71B8A8BEC516CF46835CA629156CF21163F6EE@bedford.idacorp.local> In-Reply-To: <71B8A8BEC516CF46835CA629156CF21163F6EE@bedford.idacorp.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312291402.35789.scrawford@pinpointresearch.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/70 X-Sequence-Number: 2516 On Saturday 27 December 2003 3:37 pm, Seader, Cameron wrote: > I cannot figure this out, and im no SQL guru and would like to do > this with an SQL statement if i can. so far here is my SQL > statement. > > SELECT * FROM t444d500009b5_4_6 ORDER BY utctime DESC > > What can i add here to have the column in this table converted from > UTC to MST. any input would be helpful > Thanks, Depends. If the data is an INT (seconds from the epoch) and your timezone is set correctly then abstime(utctime) should give you local time (adjusted appropriately for Daylight Saving). What is the data type of utctime? Cheers, Steve