Handle PHP warnings over date format