Add the milliseconds part when converting Date objects.

fixes #536