Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

DateTimeField getting corrupted on save if microsecond part has less then 6 positions #21

Open
mikluko opened this issue Sep 15, 2011 · 0 comments

Comments

@mikluko
Copy link

mikluko commented Sep 15, 2011

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
mikluko pushed a commit to mikluko/redisco that referenced this issue Sep 15, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant