fix date with gettime