Search Postgresql Archives

Re: Problems with timestamp with time zone and old dates?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 21, 2012 at 10:12 PM, Scott Marlowe <scott.marlowe@xxxxxxxxx> wrote:
> On Tue, Aug 21, 2012 at 10:08 PM, Scott Marlowe <scott.marlowe@xxxxxxxxx> wrote:
>> On Tue, Aug 21, 2012 at 3:29 PM, Michael Clark <codingninja@xxxxxxxxx> wrote:
>>> For example, if I insert like so:
>>> INSERT INTO sometable (startdate) values ('1750-08-21 21:17:00+00:00');
>>
>> What's the reason for you inserting with an offest instead of letting
>> the client timezone set it for you?  Just wondering.
>
> Note that if you just want to get out what you're putting in (GMT) you
> can do this:
>
> select startdate at time zone 'GMT' from sometable ;
>       timezone
> ---------------------
>  1750-08-21 21:17:00

Or you could just use plain timezones, not timezones with timestamp.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux