You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have discovered that mongo, every time you save a date on the DB, removes the timezone. This means that the following code will generate an error
obj=klass.objects.create(time=now()) # now of django.utils.timezonemax(obj.time, now()) # no error, the value is not retrieved from the dbobj.reload("time") # reloading the field with the actual value from mongomax(obj.time, now()) # TypeError: can't compare offset-naive and offset-aware datetimes
We could leverage CodeQL to write queries that generate alerts for these kind of issues at org level
The text was updated successfully, but these errors were encountered:
We have discovered that mongo, every time you save a date on the DB, removes the timezone. This means that the following code will generate an error
We could leverage CodeQL to write queries that generate alerts for these kind of issues at org level
The text was updated successfully, but these errors were encountered: