Jeremy- 

Looks to be more complicated than that. It maybe like oracle where the time 
zone is a property of the connection: SELECT CONNECTION_PROPERTY( 
'TimeZoneAdjustment' ); 


There is a data type of datetimeoffset which is a TIMESTAMP WITH TIME ZONE. I 
tried that, but it actually stores the value in a VARCHAR(29). So, I don't like 
that. 


I'm thinking I'm going to have to set/get that connection property similar to 
how oracle does it. Thoughts? 


Thanks again for the help and the patience. 


-GregD 





----- Original Message -----

From: "Jeremy Evans" <[email protected]> 
To: [email protected] 
Sent: Friday, August 30, 2013 6:01:36 PM 
Subject: Re: SqlAnywhere Adapter Timestamp problems 


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 . 

-- 
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