py-pgproto
py-pgproto copied to clipboard
timestamp_encode() raises an Exception when encoding timezone-aware datetimes
When passing a timezone-aware datetime to timestamp_encode() an exception is raised when subtracting pg_epoch_datetime as is it timezone-naive.
I believe that in this case pg_epoch_datetime_utc should be subtracted instead.