﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26498	Data loss of microseconds on MySQL and SQLite	Adam Johnson	nobody	"Django provides `django.db.backends.utils.typecast_time` as a converter function for MySQL and SQLite. This function uses floating point logic which unfortunately causes loss of precision on some values, for example:

{{{
In [1]: from django.db.backends.utils import typecast_time

In [2]: typecast_time('12:45:30.126631')  # okay
Out[2]: datetime.time(12, 45, 30, 126631)

In [3]: typecast_time('12:45:30.126630')   # woops
Out[3]: datetime.time(12, 45, 30, 126629)
}}}

This will probably only cause loss of a single microsecond, but it's annoying that the database doesn't roundtrip values."	Bug	closed	Database layer (models, ORM)	1.8	Normal	fixed		me@…	Accepted	1	0	0	1	0	0
