add parse/format test, and fix random millisecs bug