How to properly convert the Last-Modified header from an HTTP response to an NSDate on iOS

后端 未结 1 664
你的背包
你的背包 2021-02-05 10:16

I am looking for a fully working solution, one that works with:

  • any iOS locale or timezone
  • any/most HTTP servers
  • Xcode 4.0.2 (see why)
1条回答
  •  北荒
    北荒 (楼主)
    2021-02-05 11:07

    The only thing wrong is that you're missing asterisks in-between NSString and lastModifiedString, and also between NSDate and date. Once you put those in, this code works for me.

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