Re: [sqlalchemy] How to have MySQL store TIMESTAMP but return timezone-aware datetime objects

2019-06-28 Thread Charles-Axel Dein
Thanks so much for the detailed answer Mike, and for the quick fix! You're the best. On Thu, Jun 27, 2019 at 7:13 PM Mike Bayer wrote: > > > On Thu, Jun 27, 2019, at 12:02 PM, Charles-Axel Dein wrote: > > Hi, > > I'm trying to have a deleted_at column on my records. I use MySQL and > latest sqla

Re: [sqlalchemy] How to have MySQL store TIMESTAMP but return timezone-aware datetime objects

2019-06-27 Thread Mike Bayer
On Thu, Jun 27, 2019, at 12:02 PM, Charles-Axel Dein wrote: > Hi, > > I'm trying to have a deleted_at column on my records. I use MySQL and latest > sqlalchemy as of writing. For historical reasons, I want to keep using the > MySQL's TIMESTAMP columns. > > I would like to use timezone-aware d

[sqlalchemy] How to have MySQL store TIMESTAMP but return timezone-aware datetime objects

2019-06-27 Thread Charles-Axel Dein
Hi, I'm trying to have a deleted_at column on my records. I use MySQL and latest sqlalchemy as of writing. For historical reasons, I want to keep using the MySQL's TIMESTAMP columns. I would like to use timezone-aware datetime throughout my codebase. Everything in my DB is stored as UTC, so I