PynamoDB icon indicating copy to clipboard operation
PynamoDB copied to clipboard

UTCDateTimeAttribute accepts timezone-naive datetime objects.

Open abcydybcy opened this issue 3 years ago • 1 comments

Not much of a bug, but stumbled upon it today and wasted a good while. Might be reasonable to consider throwing a warning when UTCDateTimeAttribute is assigned a timezone-naive value.

abcydybcy avatar Jul 05 '22 11:07 abcydybcy

It might be a good idea -- wasted plenty of time myself over this (naive when setting for the first time, UTC when reading -- and then arithmetics blow up).

ikonst avatar Jul 05 '22 18:07 ikonst