Address deprecation warnings on DateMidnight