0

I am using NSDate to get the current time in UTC. I want to find a way to use that to calculate which time zone is currently 12pm.

I am looking at the NSDate class reference and am not sure what I should use.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Toast
  • 1
  • What's your definition of which timezone is currently 12pm? Does this include 12:10pm? 12:40? It's possible that two timezones could be in the 12pm hour since some timezones are offset 30 minutes. – rmaddy Jun 17 '14 at 19:18
  • Yes it includes the whole hour up to 12:59. Hmm I did not know this. What could be done in this situation? – Toast Jun 17 '14 at 19:20
  • I was thinking of just calculating the difference, in hours, between 12:00 and the current UTC time and move over that many time zones just for a rough answer. – Toast Jun 17 '14 at 19:22
  • Try something first and see what you get. If you get stuck with your solution, update your question with what you have tried and explain the issue you are having. – rmaddy Jun 17 '14 at 19:24
  • Okay, based on my theory, my real question is, how could I compare current time with 12pm of the current day. I only see ways to compare with a set date. – Toast Jun 17 '14 at 19:26
  • http://stackoverflow.com/questions/1427151/how-to-get-time-difference-in-iphone – Blane Townsend Jun 17 '14 at 19:33

0 Answers0