Q:
iOS 代碼里,手機(jī)系統(tǒng)時(shí)間設(shè)置為 12 小時(shí)制時(shí),轉(zhuǎn)出的時(shí)間戳帶中文 ’上午’,’下午’ 的問題
A:
設(shè)置上這塊 locale 就可以了
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_PoSlX"];