py-pgproto
py-pgproto copied to clipboard
datetime: convert timestamptz to local timezone
This fixes MagicStack/asyncpg#1006 :)
can this please be merged?
This is technically a backwards-incompatible change as clients might stringify returned datetime objects or otherwise rely on the timezone being UTC. I would play it safe and add a configuration knob to CodecContext.
Would you be willing to implement that? Or is there another way of defaulting timezone-including datetime objects?
As the timestamptz does include the timezone, returning it as UTC seems a bug to me.