NSDate / NSDateFormatter returning GMT on iPhone iOS 4.3

后端 未结 2 1787
温柔的废话
温柔的废话 2021-01-25 14:32

Why would this code be giving me GMT? (I am in US Mountain Time)

NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  autorelease];
[dateFormatter s         


        
2条回答
  •  生来不讨喜
    2021-01-25 15:12

    Yes, turns out this was a bug in Apple's Numbers on the Mac. Numbers was not interpreting the date string, or rather it was adding the time offset. The NSDate string, after formatting, was correct all along.

提交回复
热议问题