1 2 3 4 5 6 7 8 9 | import sqlalchemy as sqla from pytz import UTC class UTCDateTime(sqla.types.TypeDecorator): impl = sqla.types.DateTime def convert_bind_param(self, value, engine): return value def convert_result_value(self, value, engine): return UTC.localize(value) |
Powered by Pylons - Contact Administrators
Comments (0)
You must login before you can comment.