fixed null poiter error time format