chb / indivo_server

The Indivo™ Personally Controlled Health Record
http://indivohealth.org
GNU General Public License v3.0
103 stars 40 forks source link

iso8601.format_utc_date drops milliseconds #14

Open thisisdhaas opened 12 years ago

thisisdhaas commented 12 years ago

This means if you add a new document like a Problem (with a date field like date_onset), then pull it out again using a reporting call, your timestamps won't match. This is inconsistent and could be problematic for apps which rely on high-granularity timestamps in their data.

jgkim commented 12 years ago

Do you think this is the reason why 'test_get_connect_credentials' fails?

I have not digged into this yet, but even though iso8601.format_utc_date does not drop milliseconds, at least in MySQL, microseconds are discarded from values stored into DATETIME or TIMESTAMP columns.

thisisdhaas commented 12 years ago

Yes, that would make sense. That test passes on postgresql.

The latest release of MySQL now supports fractional seconds, so we should make sure that the test will pass on MySQL 5.6.4.

We should also note this issue in the docs.