Wrong time from NSDateFormatter

后端 未结 3 1188
南旧
南旧 2021-01-24 14:42

I have a string that I want to parse the time from:

NSString *longdate = @\"Mar 27, 2011 8:38:38 PM\";

I want to parse this date and output jus

3条回答
  •  滥情空心
    2021-01-24 15:10

    As Dave said, check your time zones. You can tell the date formatter to use your current time zone as well:

    [outFormat setTimeZone:[NSTimeZone localTimeZone]];
    

提交回复
热议问题