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 7705561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:53:38+00:00 2026-05-31T23:53:38+00:00

I call a service which returns GMT dates. Its been working fine since November,

  • 0

I call a service which returns GMT dates. Its been working fine since November, but now with daylight savings time active, its failing. Here’s a sample date from non-daylight savings time:

2011-12-07T15:50:01Z

And one from today (in daylight savings time):

2012-03-26T11:05:01+01:00

Previously I’ve been using this pattern:

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.UK);

But its failing on the second date above with a ParseExcepton (“Unparsable date…”). So, can one pattern be used for both, and if so what is it? If I can’t use one pattern for both, what is the correct pattern for the second date above?

It shouldn’t make a difference, but if it does this is in use on the Android platform.

  • 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-31T23:53:41+00:00Added an answer on May 31, 2026 at 11:53 pm

    It definitely makes a difference that you’re using Android, as it would make a difference in this case if you were using Java 5/6 or 7.

    The pattern you’re using specifies a literal ‘Z’ (also ‘T’) to be parsed. It is not parsing a timezone. You need to drop the single-quotes from around the ‘Z’ to start parsing an actual time-zone.

    According to the Android JavaDoc, it is unclear whether a capital Z will even work in this case, as the format of the hours/minutes is pretty specific. I don’t know enough about the Android SDK to confirm, but the colon definitly makes a difference in standard Java.

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

Sidebar

Related Questions

Been doing some playing call my service which is on a different domain using
I call a service which returns a gzipped file. I have the data as
I'm working with a service which returns JSON which can be converted to Map
I have a WCF Service which returns a string. I am trying to call
Its quite simpel: How do i call a web-service which can receive a XML-String
I have a web service call that returns XML which I convert into domain
I have a web service which is running fine when i call it from
I am trying to call a web service (using nusoap ), which work well
When I call, the service's method, I have Web Service Exception happening which I
I have a search form used to query service provisions, which I will call

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.