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

  • Home
  • SEARCH
  • 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 8537315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:52:22+00:00 2026-06-11T10:52:22+00:00

I need to communicate with one application that is not implementing the full ISO

  • 0

I need to communicate with one application that is not implementing the full ISO 8601 and only accept the format +HH:mm for time zone offset.

Android seems to only generate the format +HHmm (no ‘:’ character in between hours and minutes) with the ‘z’ in SampleDateFormat.

Code example:

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
String str = String.format(Locale.US, "%s", sdf.format(new Date(0)));

generates: 1970-01-01T00:00+0000

and I would like to generate: 1970-01-01T00:00+00:00

Is there any simple way of producing the desirable output without writing the code to manipulate the string?

Thanks,
Luis

  • 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-06-11T10:52:23+00:00Added an answer on June 11, 2026 at 10:52 am

    I think the easiest way is to manipulate a string.

    a) SimpleDateFormat doesn’t support what you need.

    b) The method appendNumericTimeZone in SimpleDateFormat class is private. So, you can’t override it.

    2) You can create your own formater (implement java.text.DataFormat). However, it will be way more hassle than string manipulation.

    BTW. Interesting thing which I found while looking into SimpleDateFormat source code. There is some code which generates almost what you need (it adds to the end “GMT+XX:XX”). However, this code will be only called, if you specified “Z” in the format and system can’t find a timezone name for current timezone.

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

Sidebar

Related Questions

I'm developing an application that will need to communicate with itself running on different
I have a TCP based Netty application with multiple clients that need to communicate
Hey, I'm using php 5 and need to communicate with another server that runs
I need to develop an ANDROID client that will communicate with the server that
I need to communicate between server/client. I saw that CORBA is used for different
I'm going to need to integrate a Java application that I wrote with a
I'm working on a Java application that needs to communicate with a C application.
My Facebook application needs the IP Address of another user to communicate with that
We have an application for which we're using InstallShield LE (the one that comes
I am trying to setup a Nexus One phone to communicate with an application

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.