Avoid possible discrepancy when using new Date()