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

Hope someone can help i cant seem to get my head around this, i
Hope someone can help me out with this problem I am having. I just
I hope someone can help me here. I'm having trouble loading this variable. Right
I hope you can help me. I have a web service that needs to
I hope you can help. This has been confounding me for hours. I have
I hope someone can help me with this, as I'm unable to find the
Hope someone can help me with this, it has me totally stumped My application
Hope you can help. In my ASP.net MVC3 app, all my controllers descend from
hope someone can help. I have two tables: Users -UserID -UserName UsersType -UserTypeID -UserID
I hope you can help, I've tried for hours to understand mod rewrite but

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.