convert time.h to ctime