Re: SQL convert UTC to MST

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: "Seader, Cameron" <CSeader(at)idahopower(dot)com>, pgsql-php(at)postgresql(dot)org
Subject: Re: SQL convert UTC to MST
Date: 2003-12-29 22:02:35
Message-ID: 200312291402.35789.scrawford@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Michael Hanna 2004-01-07 03:09:34 displaying a rowset in php...same column names
Previous Message Michael Fuhr 2003-12-28 06:04:21 Re: SQL convert UTC to MST