fix datetime warning