DateTimeField getting corrupted on save if microsecond part has less then 6 positions
mikluko opened this issue · 0 comments
mikluko commented
Script below raises AssertionError while it should run successfuly.
from redisco import models
import datetime as dt
import redisco
redisco.connection.flushdb()
class A(models.Model):
when = models.DateTimeField()
when = dt.datetime(2011, 1, 1, 0, 0, 0, 1)
A.objects.create(when=when)
obj = A.objects.get_by_id(1)
assert obj.when.microsecond == when.microsecond