Hi,

My database has all datetime values as UTC.
Now I want to map the values for various time zones (depending on 
customers) and take daylight savings into an account.

Here is a valid example in Postgres.  It queries the UTC based database for 
values after 02:00 Danish time

set time zone 'Europe/Copenhagen';
select ts, ts at time zone 'Europe/Copenhagen'  from sample_ts
where ts >= '2013-03-31 02:00:00' at time zone 'UTC';

The 1st column is "ts" (in UTC), 2nd column is "ts" at Europe/Copenhagen so 
the database maps the values to the correct time zone.

I have been looking for how to do this in sqlalchemy without luck.  It 
seems that this conversion must be done in Python even though the database 
can do this in a perfect way.

Has someone found a way to "allow" the database to handle this?

Thanks,
   - Gummi



-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to