Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2008, 11:39 AM   #1 (permalink)
Registered Member
 
Join Date: May 2008
Posts: 90
WayneDavidDaley is an unknown quantity at this point
Default date time conversion

I have a date returned from a feed in the format
The 01 Jul 2008 15:00:00 +0100 as a string. I'm assuming this is a
date string which is GMT plus one hour. I would like to convert this
to the date and time for the time zone that the ursers iPod or iphone
is set to. I've looked at NSDateformatter and NSCalendarDate but I'm
Not sure how to get the devices current time zone setting or how to
Do the conversion. Does anyone know of or have a sample code
Snippet that does something like this?

Thanks,
Wayne
WayneDavidDaley is offline   Reply With Quote
Old 07-01-2008, 05:05 PM   #2 (permalink)
Registered Member
 
Join Date: Apr 2008
Location: Colorado
Posts: 312
jonc is an unknown quantity at this point
Send a message via AIM to jonc
Default Re: date time conversion

Today I also had a need to suddenly determine the time zone the iPhone was in. I have been digging through the documentation but so far have had no luck. Anyone else have any ideas on this?
jonc is offline   Reply With Quote
Old 07-01-2008, 06:32 PM   #3 (permalink)
Registered Member
 
Join Date: May 2008
Posts: 90
WayneDavidDaley is an unknown quantity at this point
Default Re: date time conversion

I think this will tell you what time zone the user has set as their preference...not sure if you want to know the timezone the phone is in or what the user has as a preference. I'm still trying to figure out how to convert a date string from one time zone into a date time string for another timezone though.

NSTimeZone *App_defaultTimeZone;
App_defaultTimeZone = [[NSTimeZone defaultTimeZone] retain];

Regards,
Wayne
WayneDavidDaley is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SELECT from sqlite-database for a specific date martinn iPhone SDK Development 0 07-12-2008 02:03 PM
Time to approve updates? Suck iPhone SDK Development 0 07-12-2008 11:13 AM
Submission date mismatch mademo iPhone SDK Development 11 07-11-2008 05:43 AM
Expiration Date on Developer Certificate... WayneDavidDaley iPhone SDK Development 2 06-03-2008 09:16 AM
SDK Beta 5 - Date Picker reverts to year 0002 eugene3000 iPhone SDK Development 3 05-07-2008 11:48 AM


» Advertisements
» Online Users: 326
6 members and 320 guests
blueorb, guusleijsten, Kryckter, LEARN2MAKE, n00b, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:54 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0