Re: SQL convert UTC to MST - Mailing list pgsql-php

From Steve Crawford
Subject Re: SQL convert UTC to MST
Date
Msg-id 200312291402.35789.scrawford@pinpointresearch.com
Whole thread Raw
In response to SQL convert UTC to MST  ("Seader, Cameron" <CSeader@idahopower.com>)
Responses displaying a rowset in php...same column names  (Michael Hanna <taojones@sympatico.ca>)
List 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


pgsql-php by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: SQL convert UTC to MST
Next
From: Michael Hanna
Date:
Subject: displaying a rowset in php...same column names