asyncpg
asyncpg copied to clipboard
set value to datetime.time for TIME type is not working
column type is TIME. when set value to datetime.time, I got this exception.
asyncpg.exceptions.DataError: invalid input for query argument $10: datetime.time(0, 1, 2, tzinfo=<DstTzInfo... ('NoneType' object has no attribute 'days')
I'm having the same issue, though it seems to only break for timezones with Daylight Savings Time. Of the following tzinfos, the first two works just fine, and the last one raises the same error you get:
>>> pytz.timezone('UTC')
<UTC>
>>> pytz.timezone('GMT')
<StaticTzInfo 'GMT'>
>>> pytz.timezone('CET')
<DstTzInfo 'CET' CET+1:00:00 STD>