Closed greedo closed 9 years ago
Hi greedo,
Thanks a bunch for filing the issue. I hadn't noticed the problem myself because I'm using YAML for all of my fixtures files, and it has the ability to markup things like datetimes (see the example below).
start_time: !!timestamp 2013-03-07T10:30:00-08:00
end_time: !!timestamp 2013-03-07T11:30:00-08:00
I don't think this is a hard problem to solve, I believe I just need to write up a custom decoder that I use when I load the JSON. I'll get to it as soon as I can, but in the meantime, maybe you should try YAML. I tend to prefer it myself. Personally, I think it's easier to read than JSON, and I love the fact that I can comment all of my fixtures.
Fixed by ca780e3
If you try to set a SQLAlchemy
DateTime
value using SQLite as the backing database, you will getSince you cannot really import
datetime
and set this in the json directly it be handled as the object is createdOr using a separate setter function.
Again this is a gotcha with SQLite that is up to you to either warn people about or provide a way for them to be set.