NSDate and NSDateComponents return wrong date

后端 未结 1 1824
南旧
南旧 2020-12-12 03:47

I know that this question was asked a million times, I just can\'t find a solution. The problem is: I\'m modifying an NSDate to return either the date of the fi

相关标签:
1条回答
  • 2020-12-12 04:23

    The date is displayed in GMT: 2012-02-29 00:00:00 +0000 is 2012-03-01 22:00:00 +0200. Also don't forget daylight saving time change which explains why you get a difference of 3 hours sometimes.

    The result date is correct, but the debugger displays it in GMT.

    0 讨论(0)
提交回复
热议问题