Rewrite getTimeStringFromInt in terms of format.