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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:42:16+00:00 2026-06-09T17:42:16+00:00

I have date format like EEE, dd MMM yyyy HH:mm:ss Z , and the

  • 0

I have date format like "EEE, dd MMM yyyy HH:mm:ss Z", and the date is

String date = "Tue, 14 Aug 2012 07:26:33 +0000";

How to change to +0700 time zone without change the date format?

This is what I try

String sDate = null;
Date date = null;
try {
    sDate = "Tue, 14 Aug 2012 07:26:33 +0000";
    SimpleDateFormat curFormater = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z");
    curFormater.setTimeZone(TimeZone.getTimeZone("GMT"));
    try {
        date = curFormater.parse(sDate);
    } catch (ParseException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
} catch (DropboxException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
lastUpdate.setText("Last Update : " + date.toString());

but the result is Tue Aug 14 14:26:33 ICT 2012

  • 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-09T17:42:17+00:00Added an answer on June 9, 2026 at 5:42 pm

    You’re nearly there, you’ve parsed the date correctly, but you’re relying on the default toString() instead of the format you’ve already created.

    Try this instead for the last line:

    lastUpdate.setText(curFormater.format(date));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the date in a string format like so '11/2/2009' (m/d/yyyy) I need
I have the following date format: Tue Mar 06 17:45:35 -0600 2012 and I
I have a date in String format, mm/dd/yyyy I want to convert this to
I have a date string which looks like this: Thu Feb 09 2012 01:50:00
I have a variable called $date with a date format like 2012-01-30. On the
i have a problem while inserting the date format like mm/dd/yyyy in mySQL. It
I have this date time format in string 11:56:41, 11/22/2011. Here's what I want:
I have a date format like MMMM dd, yyyy and i am using <fmt:formatDate
what will be the regular expression of date format like '01-Aug-12'. I have the
I have date in the text format like: 6 weeks ago, 2012 April 18

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.