Re: [GENERAL] Timestamp with time zone 'negative' problem

2012-01-20 Thread Tom Lane
"Prodan, Andrei" writes: > I have a DB in which items which are 'always valid' have a from_date of > 19000101 00+1 (Europe/Berlin) > When i try to restore the same DB to (Europe/Bucharest), instead of > 19000101 00+2, the timestamp becomes "1900-01-01 00:44:24+01:44:24" > which is ... stra

[GENERAL] Timestamp with time zone 'negative' problem

2012-01-20 Thread Prodan, Andrei
Hello, I have a DB in which items which are 'always valid' have a from_date of 19000101 00+1 (Europe/Berlin) When i try to restore the same DB to (Europe/Bucharest), instead of 19000101 00+2, the timestamp becomes "1900-01-01 00:44:24+01:44:24" which is ... strange. My software then compl

Re: [GENERAL] timestamp with time zone, retrieving input offset/timezone

2009-08-06 Thread Alban Hertroys
On 4 Aug 2009, at 13:09, Der Tung wrote: But know I have two Users A and B in different timezones. When A saves a timestamp I want B to: - Get the timestamp displayed in his timezone - Get the timestamp displayed in the timezone a originally saved it in Does the type “time

Re: [GENERAL] timestamp with time zone, retrieving input offset/timezone

2009-08-04 Thread Scott Marlowe
On Tue, Aug 4, 2009 at 5:09 AM, Der Tung wrote: > Hello there, > > We are creating an Application that needs to handle timestamps in different > timezones in particular: > > Input and output in timezone of the User is no problem with > > Set Time Zone and At Time Zone > > But know I have two Users

[GENERAL] timestamp with time zone, retrieving input offset/timezone

2009-08-04 Thread Der Tung
Hello there, We are creating an Application that needs to handle timestamps in different timezones in particular: Input and output in timezone of the User is no problem with Set Time Zone and At Time Zone But know I have two Users A and B in different timezones. When A saves a timest

Re: [GENERAL] timestamp with time zone tutorial

2009-07-20 Thread Adrian Klaver
On Sunday 19 July 2009 10:59:24 pm Dennis Gearon wrote: > Hey Tom, > I was trying to use 'US/Pacific-New' as my long, unabbreviated > timezone and it wasn't working. I thought postgres wasn't accepting the > unabbreviated, geopolitical, daylight savings time, time zones. Turns out, > the serve

Re: [GENERAL] timestamp with time zone tutorial

2009-07-20 Thread Karsten Hilbert
> I just have to read more on how to get it out relative to a different > time zone than it went in. I'll find it. Sounds like a job for SELECT ... AT TIME ZONE ...; Karsten -- Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/g

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
the movie - 'Syriana' --- On Sun, 7/19/09, Tom Lane wrote: > From: Tom Lane > Subject: Re: [GENERAL] timestamp with time zone tutorial > To: "Dennis Gearon" > Cc: pgsql-general@postgresql.org > Date: Sunday, July 19, 2009, 8:00 PM > Dennis Gearon > writes: &

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Tom Lane
Dennis Gearon writes: > What I want is to be able to insert into my project's database, times > given by anybody anywhere on the planet (the SUBMITTER), add the appropriate > timezone in the insert statement so that it in 'GMT/UMT' neutral'. I believe > this is the way Postgres does it, st

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
raphical location of the SUBMITTER. > From: Adrian Klaver > Subject: Re: [GENERAL] timestamp with time zone tutorial Dennis Gearon wrote: > > None of the examples of converting a string > to_timestamp() show using a > > time zone input as an input.Does it allow full length

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Adrian Klaver
On Sunday 19 July 2009 6:41:24 pm Dennis Gearon wrote: > None of the examples of converting a string to_timestamp() show using a > time zone input as an input.Does it allow full length timezones for > daylight savings time at the timestamp instant in time, or just an > abbreviation for a fixed offs

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
rom: Adrian Klaver > Subject: Re: [GENERAL] timestamp with time zone tutorial > To: "Dennis Gearon" > Cc: pgsql-general@postgresql.org > Date: Sunday, July 19, 2009, 5:15 PM > On Sunday 19 July 2009 4:56:09 pm > Dennis Gearon wrote: > > I read it better, and

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Adrian Klaver
On Sunday 19 July 2009 4:56:09 pm Dennis Gearon wrote: > I read it better, and it makes more sense now. > > But, > I'd like it to show how to insert: > 'strings' - which it does > timestampz value -->using to_timestampz(...) For above: http://www.postgresql.org/docs/8.4/interactive/functio

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
I read it better, and it makes more sense now. But, I'd like it to show how to insert: 'strings' - which it does timestampz value -->using to_timestampz(...) integers::timestampz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Sam Mason
On Sun, Jul 19, 2009 at 01:29:14PM -0700, Dennis Gearon wrote: > INSERTing timestampz, 'to_timestamp', output formatting, input formatting, > SERVER TIME, USER_LOCAL_TIME, multi timezone applications. > > Anyone wonder how those all work? **I** sure do!!! The official docs[1,2] have generally be

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Adrian Klaver
On Sunday 19 July 2009 1:29:14 pm Dennis Gearon wrote: > INSERTing timestampz, 'to_timestamp', output formatting, input formatting, > SERVER TIME, USER_LOCAL_TIME, multi timezone applications. > > Anyone wonder how those all work? **I** sure do!!! > > Is there a tutorial anywhere on how to do all t

[GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
INSERTing timestampz, 'to_timestamp', output formatting, input formatting, SERVER TIME, USER_LOCAL_TIME, multi timezone applications. Anyone wonder how those all work? **I** sure do!!! Is there a tutorial anywhere on how to do all those? Can anyone who is knowledgeable about this: (1) Po

Re: [GENERAL] timestamp with time zone output incorrect

2008-04-27 Thread Lew
Steve Martin wrote: Hi, We are having trouble with the output of timestamp with time zone with versions 8.1.10 and 8.3.1. It seems reversed, and change over times are incorrect. timezone for both is: => show timezone ; TimeZone - NZST-12NZDT (1 row) Note, change over times for

Re: [GENERAL] timestamp with time zone output incorrect

2008-04-27 Thread Steve Martin
Tom Lane wrote: Martijn van Oosterhout <[EMAIL PROTECTED]> writes: On Thu, Apr 24, 2008 at 06:30:27PM +1200, Steve Martin wrote: => show timezone ; TimeZone - NZST-12NZDT (1 row) I have no idea what timezone that it. Presumably it switches between daylight s

Re: [GENERAL] timestamp with time zone output incorrect

2008-04-26 Thread Tom Lane
Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > On Thu, Apr 24, 2008 at 06:30:27PM +1200, Steve Martin wrote: >> => show timezone ; >> TimeZone >> - >> NZST-12NZDT >> (1 row) > I have no idea what timezone that it. Presumably it switches between > daylight savings and non-daylig

Re: [GENERAL] timestamp with time zone output incorrect

2008-04-26 Thread Martijn van Oosterhout
On Thu, Apr 24, 2008 at 06:30:27PM +1200, Steve Martin wrote: > Hi, > > We are having trouble with the output of timestamp with time zone with > versions 8.1.10 and 8.3.1. > It seems reversed, and change over times are incorrect. > > timezone for both is: > => show timezone ; > TimeZone > ---

[GENERAL] timestamp with time zone output incorrect

2008-04-26 Thread Steve Martin
Hi, We are having trouble with the output of timestamp with time zone with versions 8.1.10 and 8.3.1. It seems reversed, and change over times are incorrect. timezone for both is: => show timezone ; TimeZone - NZST-12NZDT (1 row) Note, change over times for this year is: Sun

Re: [GENERAL] timestamp with time zone

2007-12-14 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Tatsuo Ishii <[EMAIL PROTECTED]> wrote: % From: "Magnus Hagander" <[EMAIL PROTECTED]> [...] % > > Can I get "+04" without knowing that I inserted the data using "+0400" % > > time zone? % > No. The closest you can get is to store the tz in a different column % and

Re: [GENERAL] timestamp with time zone

2007-12-13 Thread Scott Marlowe
On Dec 12, 2007 11:10 PM, Tatsuo Ishii <[EMAIL PROTECTED]> wrote: > Hi, > > Can someone enlighten me? > > I know that I can insert date/time data along with time zone info into > the timestamp with time zone data type. My question is, can I extract > the *original* time zone info afterward? I seems

Re: [GENERAL] timestamp with time zone

2007-12-13 Thread Tatsuo Ishii
From: "Magnus Hagander" <[EMAIL PROTECTED]> Subject: Re: [GENERAL] timestamp with time zone Date: Thu, 13 Dec 2007 07:45:18 +0100 Message-ID: <[EMAIL PROTECTED]> > > > Tatsuo Ishii wrote: > > > > Hi, > > > > > > >

Re: [GENERAL] timestamp with time zone

2007-12-12 Thread Magnus Hagander
> > Tatsuo Ishii wrote: > > > Hi, > > > > > test=# select t at time zone 'jst' from t2; > > > timezone > > > - > > > 17:34:56+09 > > > (1 row) > > > > > > test=# select t::time from t2; > > > t > > > -- > > > 12:34:56 > > > (1 row) > > > > Hello, > > > > time

Re: [GENERAL] timestamp with time zone

2007-12-12 Thread Tatsuo Ishii
> Tatsuo Ishii wrote: > > Hi, > > > test=# select t at time zone 'jst' from t2; > > timezone > > - > > 17:34:56+09 > > (1 row) > > > > test=# select t::time from t2; > > t > > -- > > 12:34:56 > > (1 row) > > Hello, > > timezone_test=# select cast(t as time wi

Re: [GENERAL] timestamp with time zone

2007-12-12 Thread Joshua D. Drake
Tatsuo Ishii wrote: Hi, test=# select t at time zone 'jst' from t2; timezone - 17:34:56+09 (1 row) test=# select t::time from t2; t -- 12:34:56 (1 row) Hello, timezone_test=# select cast(t as time with time zone) from t2; t - 12:3

[GENERAL] timestamp with time zone

2007-12-12 Thread Tatsuo Ishii
Hi, Can someone enlighten me? I know that I can insert date/time data along with time zone info into the timestamp with time zone data type. My question is, can I extract the *original* time zone info afterward? I seems impossible. May be I should use date + time with time zone to preserve the t

[GENERAL] timestamp with time zone

2007-12-12 Thread Tatsuo Ishii
Hi, Can someone enlighten me? I know that I can insert date/time data along with time zone info into the timestamp with time zone data type. My question is, can I extract the *original* time zone info afterward? I seems impossible. May be I should use date + time with time zone to preserve the t

Re: [GENERAL] Timestamp with time zone: why not?

2007-05-24 Thread Scott Marlowe
[EMAIL PROTECTED] wrote: Would I be right in thinking that, in general, a column to hold timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE' and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'? To put it another way, for what reasons might the 'TIMESTAMP' type be preferred to

Re: [GENERAL] Timestamp with time zone: why not?

2007-05-24 Thread Rich Shepard
On Wed, 23 May 2007, [EMAIL PROTECTED] wrote: Would I be right in thinking that, in general, a column to hold timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE' and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'? If the application's users are in different time zones, o

Re: [GENERAL] Timestamp with time zone: why not?

2007-05-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/23/07 18:54, [EMAIL PROTECTED] wrote: > Would I be right in thinking that, in general, a column to hold > timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE' > and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'? > > To put i

[GENERAL] Timestamp with time zone: why not?

2007-05-23 Thread km
Would I be right in thinking that, in general, a column to hold timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE' and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'? To put it another way, for what reasons might the 'TIMESTAMP' type be preferred to 'TIMESTAMP WITH TIME ZONE

Re: [GENERAL] timestamp with time zone question...

2004-11-21 Thread P. George
oops. that did it. ;-) thanks. - philip On Nov 21, 2004, at 8:42 PM, Michael Glaesemann wrote: On Nov 22, 2004, at 11:30 AM, P. George wrote: well... the examples in the documentation work, but they only use static dates (hard-coded, i mean): SELECT TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:

Re: [GENERAL] timestamp with time zone question...

2004-11-21 Thread Michael Glaesemann
On Nov 22, 2004, at 11:30 AM, P. George wrote: well... the examples in the documentation work, but they only use static dates (hard-coded, i mean): SELECT TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-05' AT TIME ZONE 'PST'; but, when i try: SELECT mydatecolumn FROM mytable AT TIME ZONE 'PST';

Re: [GENERAL] timestamp with time zone question...

2004-11-21 Thread P. George
See the documentation for Date/Time Types and Date/Time Functions and Operators: http://www.postgresql.org/docs/7.4/static/datatype-datetime.html http://www.postgresql.org/docs/7.4/static/functions-datetime.html if so, does that imply that i can translate these stored dates to any target time zone

Re: [GENERAL] timestamp with time zone question...

2004-11-21 Thread Michael Fuhr
On Sun, Nov 21, 2004 at 07:58:37PM -0600, P. George wrote: > is it storing in the time zone of the actual server or something? not > sure where my db server actually, physically is. See the documentation for Date/Time Types and Date/Time Functions and Operators: http://www.postgresql.org/docs/

[GENERAL] timestamp with time zone question...

2004-11-21 Thread P. George
i have a table with a 'timstamp with time zone' column. when i insert into it: '18 Nov 2004 00:00:00 PST' ...it looks like: 2004-11-18 03:00:00-05 ...once stored in the database. 0 o'clock vs. 3 o'clock. is it storing in the time zone of the actual server or something? not sure where my db server

[GENERAL] timestamp with time zone

2001-08-02 Thread Jim Ballard
(Resending this as it was bounced for some reason).   PostgreSQL's "timestamp with time zone" implementation seems to fall short of the standard in the following way.   The standard calls for this datatype to be stored as a timestamp and a separate time zone displacement.  This allows for