fix datetime compare