* add formatTime function.