NSDateFormatter dateFromString and iPhone in 24 Hour Format Confusion

前端 未结 5 1638
小蘑菇
小蘑菇 2020-12-03 05:04

I\'m having a problem. I get incoming time strings in 12-hour format, and I\'m turning them into NSDate objects. When the iPhone is in 12 hour format, no problem. But when i

5条回答
  •  半阙折子戏
    2020-12-03 05:21

    I changed from @"hh:mm:ss" to @"HH:mm:ss" and time style was changed from "1:03 PM" to "13:03". Hope this will help you.

提交回复
热议问题