NSDate variable persistence

27 Views Asked by At
NSDate *sampleDate = [NSDate date];

NSLog(@"%@", sampleDate);

The above date will change when time zone of the device is changed. Is this the expected behavior?

If we store a date in a variable, it should not change even if we change the timezone of the device right?

I know its better to use timeIntervalSince1970 or referrenceDate but again why a pre set variable is being modified if we just change the timezone..

0

There are 0 best solutions below