fixed the seconds formatting issue in getTime