I need to determine if a user's current NSDate (local time zone) falls in the range of two NSDates belonging to other time zones.
For example:
I'm in California, and it's 20:00 PST. A coffee shop in New York is open between 08:00 and 00:00 EST. The coffee shop is stored as those exact values and sent in the XML along with the tz field indicating America/New_York.
I need to be able to determine if the coffee shop is open or not in the world currently. In this example, since it's only 23:00 EST in New York, then it would be open still.
I've tried using NSDate, NSTimeZone, NSCalendar, NSDateComponents to construct an algorithm to convert, but I've been unsuccessful, and I just when I think I understand it, I get confused again. NSDate has no concept of timezone, so I can't figure out what real value exists in it, since you need to pass time zones to NSDateFormatter to see.
How would you create a method to determine if [NSDate date] in [NSTimeZone localTimeZone] is between the two NSDates in the other time zone?