From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamp cast to abstime problem |
Date: | 2002-10-21 02:01:04 |
Message-ID: | 200210210201.g9L214011476@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I figured this all out; turns out they were related.
I had set my timezone in the postmaster to Poland long ago and forgot,
and that is why both the abstime and show timezone produced strange
results. Sorry.
---------------------------------------------------------------------------
Bruce Momjian wrote:
> Does anyone know why this returns 0 and not 3600?
>
> test=> select '1970-01-01 01:00:00'::timestamp::abstime::int4;
> int4
> ------
> 0
> (1 row)
>
> My time(2) manual page says:
>
> The time() function returns the value of time in seconds since 0
> hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal Time.
>
> Also, why does my TimeZone show as Poland?
>
> test=> SHOW TimeZone;
> TimeZone
> ----------
> Poland
> (1 row)
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-10-21 02:16:15 | Re: [HACKERS] reminder for those working on docs |
Previous Message | Bruce Momjian | 2002-10-21 01:50:30 | Re: pg_dump and large files - is this a problem? |