NSDate conforms to NSCopying protocol. According to the documentation for NSCopying protocol:
a copy must be a functionally independent object with values identical
to the original at the time the copy was made.
But, when I do this:
NSDate *date1 = [NSDate date];
NSDate *date2 = [date1 copy];
NSLog(@"result: date1 0x%x date2 0x%x", (int)date1, (int)date2);
// "result: date1 0x2facb0 date2 0x2facb0"
The two objects are identical (same object id). What am I missing? How do I get an independent object as a copy?