Fix date/time check