Re: timestamp (military) at time zone without the suffix

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Gauthier <davegauthierpg(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: timestamp (military) at time zone without the suffix
Date: 2018-07-11 20:11:10
Message-ID: CAKFQuwY8Z-vnPMRncLu+V+byjVi7a3pHs1p=0kjQQ74cmBmsgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, July 11, 2018, David Gauthier <davegauthierpg(at)gmail(dot)com>
wrote:

> OK, the "to_char" gets rid of the timezone extension. But the times still
> don't make sense.
>
> When I go to store this in a DB, I want to store the UTC time. How d I do
> that ?
>

Use the data type that represents exactly that, timestamptz. Using the
timestamp data type is generally not what you want even if you can get the
manipulation logic figured out.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2018-07-11 20:21:17 Re: Open Source tool to deploy/promote PostgreSQL DDL
Previous Message Adrian Klaver 2018-07-11 20:03:42 Re: timestamp (military) at time zone without the suffix