aboutsummaryrefslogtreecommitdiffstats
path: root/static/gfx
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2012-11-10 12:08:56 +0100
committerThibaut Horel <thibaut.horel@gmail.com>2012-11-10 12:08:56 +0100
commitf96f407ebaf86fcf2cca1638527f1dc80d2b035c (patch)
tree0762ef11feb8047ca01575179584af5a89a43cb3 /static/gfx
parent1ae302ff76adcb188dad5383e73c5ade158ffd8a (diff)
downloadfamille-flask-f96f407ebaf86fcf2cca1638527f1dc80d2b035c.tar.gz
Follow up to previous commit.
* Make flask db connnection also use date converters to avoid crashing when displaying dates * Update the import script to import dates from the old databse as timestamps By the way, I strongly disagree with this choice of using timestamps, for the following reasons: * why would timestamps be a better representation of times than ISO 8601? they cannot represent times before the epoch, they are more easily subject to "year 2000"-like bugs. No wonder why the vast majority of web protocols use ISO 8601 instead of timestamps. * Even MySQL internally uses ISO 8601 strings to store datetime fields * This solution requires to write unsupported sqlite code: there is no "timestamp" datatype in sqlite3, so you implicitely rely on sqlite3 casting this to a string. You also rely on the python doing implicit conversions from the database to datetime objects. The funniest part is that the way Python deals with this implicit conversion is by storing the datetime object as a "%Y-%m-%d %H:%M:%S" string in the database (which is by the way, not even standard ISO 8601:2004)! No timestamp anywhere to be seen, even though this is what is stated in schema.sql... This looks insane to me... Having explicit and standard conventions at the expense of two additional lines of code does not seems that insane in comparison to Python's insanity. python. The funniest part is that they way Python does this implicit conversion is by internally storing the
Diffstat (limited to 'static/gfx')
0 files changed, 0 insertions, 0 deletions