Fixed bugs in iso-timestring regarding printing microseconds
authorRuss Tyndall <russ@acceleration.net>
Tue, 2 Feb 2010 19:45:29 +0000 (14:45 -0500)
committerNathan Bird <nathan@acceleration.net>
Tue, 2 Feb 2010 20:55:21 +0000 (15:55 -0500)
commit4c88467c8be43c3e7e72ea362390620c669de117
tree0fb0b73c747a4333d434cc0a3a37a758e4dbb65b
parent0364b03f9b49590d89156c2fa6c8718ed7804b07
Fixed bugs in iso-timestring regarding printing microseconds

iso-timestring used to output
  YYYY-MM-DD HH:MM:SS,,UUUUUU

What was invalid in this format was the two commas and because 3 usec
would be output as xx,,3 instead of xx,,000003.

It now outputs
  YYYY-MM-DD HH:MM:SS.UUUUUU

Also we only print the amount of fractional seconds necessary.
Different databases support different precisions so this is
intended to ensure that we dont print with a greater
(ie: unparsable)  precision than we read from the DB
   EG 1.123400 sec prints as 1.1234
  and      1.0 sec prints as 1

iso-timestring new implementation tested to be ~2x less memory at
the same speed
sql/time.lisp