On Friday, August 30, 2013 1:58:16 PM UTC-7, GregD wrote:
>
> Jeremy-
>
> It is a timezone issue.  The string from the column has already been 
> adjusted for timezone.  Then when I make a DateTime using #strptime it 
> creates it with a time zone +0.  How would I deal with this?  To get the 
> timezone adjustment in the column value string, I have to cast is as 
> CAST(<column> AS TIMESTAMP WITH TIME ZONE).  Or do I use ruby to supply 
> that to strptime?
>

Well, I'm guessing this isn't a general issue with input/output of 
timestamps, but one specific to CURRENT_TIMESTAMP and maybe similar 
functions.  You could try overriding Dataset#constant_sql_append so that 
for Sequel::CURRENT_TIMESTAMP it uses CAST(CURRENT_TIMESTAMP AS TIMESTAMP 
WITH TIME ZONE) (see similar examples in shared access, mssql, and sqlite 
adapters).

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to