BareFeet wrote: > > I get the same result above when using the command line tool of the > built in SQLite version 3.4.0 or the latest binary version 3.5.9. > > FYI, this: select julianday('2008-06-12','utc'); > gives: 2454629.08333333 > > and this: select datetime(2454629.08333333, 'localtime'); > gives: 2008-06-11 24:00:00 >
Tom, There does seem to be a roundoff error in the calculation while adding the local timezone offset. SQLite version 3.5.9 Enter ".help" for instructions sqlite> select datetime(2454629.08333333); 2008-06-11 14:00:00 The base value for the hour is 14, and you are in a timezone with a +10 hour offset. It must be coming up with a sum that is slightly less than 24 hours so that it doesn't increment the day. The value is rounded correctly when formatted for display. More fun with floating point representation. :-) Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users