From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Alexander Kuprijanov <sanya-spb(at)list(dot)ru> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: different date-time in base and in system |
Date: | 2007-10-12 14:38:45 |
Message-ID: | 470F86F5.6090600@archonet.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Alexander Kuprijanov wrote:
> ========================
> $ date; echo 'select CURRENT_TIME;' | psql MyBase
> Fri Oct 12 14:51:10 MSD 2007
> timetz
> --------------------
> 10:51:11.031388+00
I'm currently at a +1 hour offset from UTC, so.
=> set time zone 'UTC';
SET
=> SELECT current_timestamp;
now
-------------------------------
2007-10-12 14:33:28.258005+00
(1 row)
=> reset time zone;
RESET
=> SELECT current_timestamp;
now
------------------------------
2007-10-12 15:33:34.17609+01
(1 row)
> Can you please help, what I must do to correct it
>
> As I understand this is tomezone issue...
See the manuals - the A-Z index has lots of entries for time-zones
including Ch 8.5.3, 43.48, 43.49
In particular this may be useful:
=> SELECT * FROM pg_timezone_names WHERE abbrev='MSD';
name | abbrev | utc_offset | is_dst
---------------+--------+------------+--------
Europe/Moscow | MSD | 04:00:00 | t
W-SU | MSD | 04:00:00 | t
(2 rows)
=> set timezone = 'Europe/Moscow';
SET
=> SELECT current_timestamp;
now
-------------------------------
2007-10-12 18:37:54.774167+04
(1 row)
HTH
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2007-10-12 14:40:19 | Re: not work in IE |
Previous Message | Pavel Stehule | 2007-10-12 14:22:32 | Re: Query problem |