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?

Moshe
  • 57,511
  • 78
  • 272
  • 425

1 Answers1

40
[[NSTimeZone localTimeZone] secondsFromGMT] / 3600
Corey Hart
  • 10,316
  • 9
  • 41
  • 47
Chuck
  • 234,037
  • 30
  • 302
  • 389