refactor-out timestamp conversion code, allow for millisecond accuracy