Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-15 Thread Martijn van Oosterhout
On Fri, Oct 15, 2004 at 06:48:40AM +0200, Jaromir Dolecek wrote: > Stuart Bishop wrote: > > Indeed - I was under the impression that the timezone would be preserved > > (which is the case in the external datetime libraries I use), but I now > > see that PostgreSQL will lose this information. > > E

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-14 Thread Jaromir Dolecek
Stuart Bishop wrote: > Indeed - I was under the impression that the timezone would be preserved > (which is the case in the external datetime libraries I use), but I now > see that PostgreSQL will lose this information. Err - how come, lose? Jaromir -- Jaromir Dolecek <[EMAIL PROTECTED]>

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-14 Thread Stuart Bishop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane wrote: | Stuart Bishop <[EMAIL PROTECTED]> writes: | |>How much overhead is there in storing a timestamp with timezone as |>opposed to one without? | | | Exactly zero. You have a misconception about what the datatype really | does --- see othe

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-14 Thread Tom Lane
Stuart Bishop <[EMAIL PROTECTED]> writes: > How much overhead is there in storing a timestamp with timezone as > opposed to one without? Exactly zero. You have a misconception about what the datatype really does --- see other responses in this thread. regards, tom lane -

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-14 Thread Stuart Bishop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane wrote: | Stuart Bishop <[EMAIL PROTECTED]> writes: | |>I'm trying to determine the best way of saying 'The current time in UTC |>with no time zone information'. | | | Isn't that a contradiction in terms? Not at all - I want 'now' in UTC time wi

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Martijn van Oosterhout
On Tue, Oct 12, 2004 at 10:43:09AM -0400, Tom Lane wrote: > Greg Stark <[EMAIL PROTECTED]> writes: > > I guess my confusion comes from the way postgres interprets unadorned time > > stamps as being in local time. And then always displays timestamps converted > > to local time. I thought it was reme

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > I guess my confusion comes from the way postgres interprets unadorned time > stamps as being in local time. And then always displays timestamps converted > to local time. I thought it was remembering the time zone specified in the > original input. In fact i

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > Tom Lane <[EMAIL PROTECTED]> writes: > >> Stuart Bishop <[EMAIL PROTECTED]> writes: > >>> I'm trying to determine the best way of saying 'The current time in UTC > >>> with no time zone information'. > >> > >> Isn't

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> Stuart Bishop <[EMAIL PROTECTED]> writes: >>> I'm trying to determine the best way of saying 'The current time in UTC >>> with no time zone information'. >> >> Isn't that a contradiction in terms? > Not if you're use

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Michael Glaesemann
On Oct 12, 2004, at 9:43 PM, Karsten Hilbert wrote: I'm trying to determine the best way of saying 'The current time in UTC with no time zone information'. Isn't that a contradiction in terms? Not if you're used to the Unix concept of storing "seconds since the epoch". In that model the quantity

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Karsten Hilbert
> > > I'm trying to determine the best way of saying 'The current time in UTC > > > with no time zone information'. > > > > Isn't that a contradiction in terms? > > Not if you're used to the Unix concept of storing "seconds since the epoch". > In that model the quantity you're storing is entirely

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Stuart Bishop <[EMAIL PROTECTED]> writes: > > I'm trying to determine the best way of saying 'The current time in UTC > > with no time zone information'. > > Isn't that a contradiction in terms? Not if you're used to the Unix concept of storing "seconds sin

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-11 Thread Tom Lane
Stuart Bishop <[EMAIL PROTECTED]> writes: > I'm trying to determine the best way of saying 'The current time in UTC > with no time zone information'. Isn't that a contradiction in terms? I *think* maybe what you want is to SET TIMEZONE = 'UTC' and then stop worrying about it. But anyone who is w

[GENERAL] 'NOW' in UTC with no timezone

2004-10-11 Thread Stuart Bishop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I'm trying to determine the best way of saying 'The current time in UTC with no time zone information'. I'm currently using CURRENT_TIMESTAMP AT TIME ZONE 'UTC' and inserting into columns defined as TIMESTAMP WITHOUT TIME ZONE which appears to work.