ziutek / mymysql

MySQL Client API written entirely in Go
Other
735 stars 161 forks source link

Fix encodeNonzeroTime to encode timestamps correctly. #78

Closed daver76 closed 11 years ago

daver76 commented 11 years ago

This is a fix for the datetime binary encoding. I was inserting timestamps and most of the time they were showing up in MySQL as "0000-00-00 00:00:00, even though the values definitely contained valid timestamps. Sometimes, the timestamps did insert correctly, though.

I narrowed it down to an encoding problem with the microseconds field.

Also, it seems like may be related to issue #74? @ex-troll can you give this a try.

ex-troll commented 11 years ago

not help

ziutek commented 11 years ago

This was fixed by pull request #79.