some fix to datetime