Time Zone offset number in Objective-c?

二次信任 提交于 2019-12-21 07:39:11

问题


How can I get the Timezone offset in Objective-C (for iPhone OS 3)?

For example, GMT -5 is US Eastern Time. I want the -5 part of it. How would I do so?


回答1:


[[NSTimeZone localTimeZone] secondsFromGMT] / 3600


来源:https://stackoverflow.com/questions/2611369/time-zone-offset-number-in-objective-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!