views:

24

answers:

1

Hi all, I'm parsing an.ics file that includes time stamps of events like this:

20101008T230000Z

This is, as far as I understand, expressed in UTC. Now, I want my app to display this time correctly, depending on the time zone where the iPhone user resides. So, as an example, if the user would be in London, the time would be displayed as '23:00' while in Amsterdam it would be '22:00'

I've been looking at similar questions here at STackOverflow, and it only confused me.

Any help is greatly appreciated.

A: 

Hopefully this helps. Read the time into an NSString and use the complementary function in NSDateFormatter (dateFromString) after setting the time zone as shown in the link. You should then be able to get a local date/time from the NSDate object's description and descriptionWithLocale functions.

darvids0n
It works perfectly, thank you very much, and my apologies that I didn't come across this myself.
Sjakelien