static datetime error fix