From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Роман Маширов <mrj(at)nandu(dot)ru> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Timezone calculation question |
Date: | 2009-03-24 14:43:01 |
Message-ID: | 27377.1237905781@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
=?UTF-8?B?0KDQvtC80LDQvSDQnNCw0YjQuNGA0L7Qsg==?= <mrj(at)nandu(dot)ru> writes:
> Seems I've missed something important about time zones. On my server
> i've got local timezone 'W-SU' (Moscow time):
> => show timezone;
> TimeZone
> ----------
> W-SU
> => select now();
> now
> -------------------------------
> 2009-03-24 13:23:39.655057+03
> Till now all seems ok. Than i'm trying to figure out local time at near
> region:
> => select now() at time zone 'UTC+4';
> timezone
> ----------------------------
> 2009-03-24 06:28:30.383373
That's not "near" Moscow. What's confusing you is that the sign
conventions are different --- in time zone names, plus means west
of Greenwich, but elsewhere (in particular, in timestamp values)
plus means east of Greenwich.
Don't blame us, blame POSIX and ISO for not talking to each other
when they made the relevant standards. Note the fine print here:
http://developer.postgresql.org/pgdocs/postgres/datatype-datetime.html#DATATYPE-TIMEZONES
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Berdam | 2009-03-24 16:38:03 | Res: [win32] 8.3.5 -> 8.3.7 install trouble |
Previous Message | Dave Page | 2009-03-24 13:51:14 | Re: debugging in pgadmin |