NSTimeZone *timezone = [NSTimeZone systemTimeZone];
NSString *timeZoneAbberivation = [timezone abbreviation];
timeZoneAbberivation正在像GMT + 5:30这样打印。但是我需要将GMT + 5:30打印为IST。 (IST来自印度/科卡塔)。
假设它是美国/纽约时区,则需要它作为EST等。
最佳答案
您可以使用NSDateFormatter
。查看提供“短特定非位置格式”的z
format参数。
NSDateFormatter Date Formatting Table
关于ios - IOS时区缩写,无GMT偏移。直接需要IST,EST等,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45327894/