Assuming I have a point in time, represented by
NSDate* now = [NSDate date];
for example: 2012-11-07 13:44:55 +0000 (the local time of the device)
I also have an array of countries
each country has a name, and geo coordinates (log,lat)
for example: England,51.5, -0.116667
Q:
how would one calculate and convert the above date-time into the current equivalent time in a specific country?
(As a side note, I rather have something local and not calling external API)
Get a list of time zones available by,
This would return something of this sort,
Now use this time zone abbreviation key, say MSD for Moscow, to get the number of seconds that is offset in Moscow’s time zone from the GMT.
The ‘no_of_seconds’ can now be added to the current date to get the date of the desired location, in this case Moscow,