updated time format routine