On 7/25/15 6:38 PM, Jinghui Niu wrote:
By the way, the database driver that I'm using is SQLite, which
doesn't support native timestamp I believe.
On Saturday, July 25, 2015 at 2:21:44 PM UTC-7, Jinghui Niu wrote:
I'm using two columns to store my datetime records: one column
stores utc timestamp as a string, the other column stores a
timezone offset as an integer. Now I find myself most of the time
writing ad hoc functions to convert those UTC times to various
local times. My code base has become really inconsistent and
repetitive.
I'm looking to write some code with sqlalchemy, natively
sqlalchemy, to allow me to get the converted local time on each
query, automatically. I've heard of that feature before.
I'm kind of lost in the documentation. Could someone point a
general direction here? I don't expect too much, just a general
direction would be highly appreciated. Thanks a lot.
--
there are multiple documented techniques for this kind of thing. Have
you looked into composite attributes or hybrid properties ? Both can
suit this use case.
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
<mailto:sqlalchemy+unsubscr...@googlegroups.com>.
To post to this group, send email to sqlalchemy@googlegroups.com
<mailto:sqlalchemy@googlegroups.com>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
--
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.
For more options, visit https://groups.google.com/d/optout.