NSDateFormatter strange behavior for very old date

2019-08-30 11:15发布

问题:

I am using NSDateFormatter in the following way:

NSDateFormatter *formatter = AUTORELEASE([[NSDateFormatter alloc] init]);

[formatter setDateStyle:dateStyle];
[formatter setTimeStyle:timeStyle];

return [formatter stringFromDate:date];

This returns me the correct date & time if the year in "date" is greater than 1893. If I specify a date with an year < 1893 , It gives me wrong time but correct date. The time usually has a difference of 7 min from the correct time.

Has anyone faced similar issues?