Moshe
Moshe

Reputation: 58067

Time Zone offset number in Objective-c?

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?

Upvotes: 11

Views: 9164

Answers (1)

Chuck
Chuck

Reputation: 237010

[[NSTimeZone localTimeZone] secondsFromGMT] / 3600

Upvotes: 40

Related Questions