Is there a way to get the offset time zone for a given date.
For example, if I am in New York and I pass in 12-12-2009 4 PM I would get back “-4” as we are 4 hours off GMT.
(In .NET land there is a function to do that off the DateTime class. So I’m guess Cocoa has it too?)
Ian
You can use the following:
This will return the offset in seconds.
See Apple’s documentation on the NSTimeZone class for details.