Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5933771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:01:14+00:00 2026-05-22T15:01:14+00:00

Hope you can help. I am importing the current GMT time for an iPhone

  • 0

Hope you can help. I am importing the current GMT time for an iPhone App. This is being retrieved via a JSON web service.

I believe I have the correct formatter string however I am getting a different date (time is still correct) when I try to format the date I’ve retrieved. The JSON date is formatted like this: Sun, 15 May 2011 20:35:31 +0000

In the example below strGMT is the date in the format I’ve just mentioned.

This is the code I’m using to get retrieved date into my code:

NSLog(@"Current GMT: %@", strGMT);
NSDateFormatter *gmtFormatter=[[NSDateFormatter alloc] init];
[gmtFormatter setDateFormat:@"EEE, dd MMM YYYY HH:mm:ss VVVV"];
//THIS IS NOT REFORMATTING CORRECTLY HERE
NSDate *gmtDateTime=[gmtFormatter dateFromString:strGMT];
NSLog(@"Current Formatted GMT Date: %@", gmtDateTime);

The log is showing the following:

Current GMT: Sun, 15 May 2011 20:35:31 +0000

Current Formatted GMT Date: 2010-12-26 20:35:31 +0000

Have I not got the formatting string correct? Any ideas why it’s gone from 15 May 2011 (today) to 26th December 2010?

Kind regards

Paul

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:01:15+00:00Added an answer on May 22, 2026 at 3:01 pm

    The correct format string is @"EEE, dd MMMM yyyy HH:mm:ss VVVV"

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi Hope someone can help me. My .net app that connects (via tcp) to
I hope there's a SharePoint expert here on SO who can help with this.
hope you can help me with this: I'm working with j_security_check and have this
Hope you can help me on this. I have a serial device, this device
hope someone can help me on this as been stuck for hours. I am
hope you can help me with this one… I saw some crazy behavior so
hope you can help me. I have html markup like this: <a href=error.htm class=button
hope you can help me with a problem: I use Struts2 with the struts2-json-plugin,
Hope you can help me with this problem. I am having issues with the
My question really has three related parts which I hope you can help me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.