NSDate not returning correct date

后端 未结 2 480
无人共我
无人共我 2020-12-04 00:25

I am printing NSDate like this:

NSDate *date = [NSDate date];
NSString *stringDate = [data description];

Right now, it\'s July 1, 2011 11:4

2条回答
  •  日久生厌
    2020-12-04 01:10

    Are you in the GMT -4 time zone? The result that it is giving you would be correct in that case, as 2011-07-02 03:43:46 +0000 is 2011-07-01 11:43:46 -4000.

提交回复
热议问题