minor fix on sanitizeDateTime function