简体   繁体   English

Objective-c中的时区偏移量?

[英]Time Zone offset number in Objective-c?

How can I get the Timezone offset in Objective-C (for iPhone OS 3)? 如何获得Objective-C中的时区偏移量(对于iPhone OS 3)?

For example, GMT -5 is US Eastern Time. 例如, GMT -5是美国东部时间。 I want the -5 part of it. 我想要它的-5部分。 How would I do so? 我该怎么办?

[[NSTimeZone localTimeZone] secondsFromGMT] / 3600

太好了,但是如何精确得到+5:30呢?

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

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