Correctly parses date in header