0

So i ran across an issue with the simulator in checking time between a server in one timezone vs. my current timezone.

When doing something like this:

startDate = [NSDate new] 

the time associated with startDate is my timezone(Eastern Time Zone). However, my simulated location of the simulator(lat, lon) is a central time zone. For date/time interval comparisons i have failures in the code because while my lat,lon simulator coordinates are in central timezone, startDate is using my system timezone.

Is there a way to get a proper date/time associated with the simulators simulated location?..like converting the lat,lon to a proper NSDate?

cspam
  • 2,911
  • 2
  • 23
  • 41
  • `NSDate objects encapsulate a single point in time, independent of any particular calendrical system or time zone` - the date has no timezone, only the NSDateFormatter for example adds timezone interpretation – luk2302 Nov 25 '15 at 22:02
  • well i really don't need a timezone persay - i just need to right time for the timezone - based on lat, lon. Does the NSDateFormatter provide that somehow? – cspam Nov 25 '15 at 23:51
  • you may want to check [this](http://stackoverflow.com/questions/7485493/get-nsdate-from-nsdate-adjusted-with-timezone?rq=1) – seto nugroho Nov 26 '15 at 00:52

0 Answers0