简体   繁体   English

如何从systemTimeZone(NSTimeZone)中提取时区

[英]How to get the extract the Time zone from systemTimeZone(NSTimeZone)

can any one get me the idea in extracting the Time zone from systemTimeZone(NSTimeZone) 任何人都可以从systemTimeZone(NSTimeZone)中提取时区

i have added the sample along with this. 我已经添加了样本。

NSTimeZone *localTime = [NSTimeZone systemTimeZone];
    NSLog(@" - current  local timezone  is  %@",localTime);

Im getting Out put as follows - current local timezone is Asia/Kolkata (GMT+05:30) offset 19800 我现在离开如下 - 当前的当地时区是亚洲/加尔各答(格林威治标准时间+05:30)抵消19800

From above out put how to get the zone alone .ie- only Asia/Kolkata 从上面说出如何单独获得该区域。仅限亚洲/加尔各答

Please help me out in this. 请帮我解决这个问题。

Thanks in advance... Siva 提前谢谢......湿婆

you can get that by [localTime name]; 你可以通过[localTime name];得到它[localTime name]; i guess... 我猜...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM