Re: Timestamp to time_t

From: Scott Mohekey <scott(dot)mohekey(at)telogis(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Timestamp to time_t
Date: 2009-09-15 23:56:26
Message-ID: a108f5c10909151656q587d24d8jda9a5ea9823a9f1f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 16, 2009 at 2:23 AM, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov
> wrote:

> Scott Mohekey <scott(dot)mohekey(at)telogis(dot)com> wrote:
> > I think the issue is that we treat TIMESTAMP WITHOUT TIME ZONE as
> > TIMESTAMP at GMT. We then convert it to a users local timezone
> > within application code.
>
> TIMESTAMP WITHOUT TIME ZONE is stored "raw" and is not considered to
> be associated to a time zone until you do so. It will default to
> assigning the time zone set on your server, which is normally your
> local time zone. Unless that's GMT, you will need to be very
> careful to always localize the timestamp to GMT before doing
> anything with it.
>
> -Kevin
>

This is exactly what we do. All of our servers are set to GMT time, all
times in the database are stored in GMT time, and are converted to a users
local time within the application.
Scott Mohekey
Systems/Application Specialist – OnTrack – Telogis, Inc.
www.telogis.com www.telogis.co.nz
+1 949 625-4115 ext. 207 (USA) +64 3339 2825 x207 (NZ)

Leading Global Platform for Location Based Services
--
This e-mail, and any attachments, is intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information. It is the property of Telogis. If you are not
the intended recipient of this e-mail, you are hereby notified that any
dissemination, distribution or copying of this e-mail, any attachments
thereto, and use of the information contained, is strictly prohibited. If
you have received this e-mail in error, please notify the sender and
permanently delete the original and any copy there of.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-09-16 01:29:58 Re: updated join removal patch
Previous Message Joshua Tolley 2009-09-15 23:02:59 Re: WIP: generalized index constraints