the ORM needs to compare in order to determine changes, and in general you should only be dealing with timezone-naive datetimes within a Python application, I'd suggest ensuring they are all in UTC in fact. It's no different IMHO from converting encoded strings to unicode first so that all values are normalized into a common format.
Steve Zatz wrote: > When I try to commit a timezone aware datetime to replace a value that was > previously timezone naive, I get a TypeError when I try to do the commit > with the message: > > TypeError: can't compare offset-naive and offset-aware datetimes > > Now I am not trying to compare anything but just store the new value in an > sqlite database. Is there a way to force the commit to take place without > it performing a comparison to the previously stored value (if that is in > fact what is going on)? > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
