add a timeFormat parameter in constructor to determine the format of time