pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: chrisj <chrisj.wood@sympatico.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Assigning a timestamp without timezone to a timestamp
Date: Tue, 3 Oct 2006 08:45:55 -0700 (PDT)
Message-ID: <6622976.post@talk.nabble.com> (raw)
In-Reply-To: <20061003145134.GA3399@phlogiston.dyndns.org>
References: <6613652.post@talk.nabble.com>
	<20061003135623.GB3191@phlogiston.dyndns.org>
	<6621346.post@talk.nabble.com>
	<20061003145134.GA3399@phlogiston.dyndns.org>


Brilliant, elegant and simple  !!

I can't wait to try it (don't have access to Postgres 9-5 EDT)  !!

thank-you !!


Andrew Sullivan wrote:
> 
> On Tue, Oct 03, 2006 at 07:26:52AM -0700, chrisj wrote:
>> location, but they are the directive to all store locations saying: "In
>> the
>> context of the timezone your store is located in,  these are the hours
>> you
>> should be open.
> 
> Ah.  Well, then, right, it _does_ have to be timezone free.  That's
> actually the only case I'd use that.  Sorry, I'm dim, and didn't
> understand properly what you were doing.  (I read the "relative to
> the store's own time zone" to refer to the corporate office.  No, I
> don't know why, either.  Told you I'm dim.)
> 
> Anyway, here's something that worked for me (expanding this into your
> case ought not to be too tricky):
> 
> testing=# SELECT * from storetz ;
>  id | timezone 
> ----+----------
>   1 | -03
> (1 row)
> 
> testing=# SELECT a.timestamp::timestamptz from (SELECT '2006-10-03
> 09:00'||"timezone" as timestamp from storetz where id = 1) as a;
>        timestamp        
> ------------------------
>  2006-10-03 12:00:00+00
> (1 row)
> 
> A
> -- 
> Andrew Sullivan  | ajs@crankycanuck.ca
> When my information changes, I alter my conclusions.  What do you do sir?
> 		--attr. John Maynard Keynes
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
> 
> 

-- 
View this message in context: http://www.nabble.com/Assigning-a-timestamp-without-timezone-to-a-timestamp-with-timezone-tf2373845....
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.




view thread (24+ messages)  latest in thread

Message-ID: <6622976.post@talk.nabble.com>
Permalink:  ../6622976.post@talk.nabble.com/
Also on:    postgresql.org/message-id/6622976.post@talk.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: chrisj.wood@sympatico.ca
  Subject: Re: Assigning a timestamp without timezone to a timestamp
  In-Reply-To: <6622976.post@talk.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox