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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:18:43+00:00 2026-06-04T19:18:43+00:00

Code: DateTimeFormat dateFormat = DateTimeFormat .getFormat(EEE MMM dd HH:mm:ss zzz yyyy); Date date =

  • 0

Code:

    DateTimeFormat dateFormat = DateTimeFormat
            .getFormat("EEE MMM dd HH:mm:ss zzz yyyy");

    Date date = dateFormat.parse("Wed May 30 18:33:22 PDT 2012");

Result:

Uncaught java.lang.IllegalArgumentException: Wed May 30 18:33:22 PDT 2012

Why?

I’ve checked and doublechecked my pattern against the docs. Plugging the pattern into a SimpleDateFormat tester gives the expected results as well, although that’s obviously not a conclusive test.

  • 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-04T19:18:44+00:00Added an answer on June 4, 2026 at 7:18 pm

    Parsing of the date has limited support as per the docs you mentioned:

    The time zone support for parsing is limited. Only standard GMT and RFC format are supported. Time zone specification using time zone id (like America/Los_Angeles), time zone names (like PST, Pacific Standard Time) are not supported.

    More specifically

    In the current implementation, timezone parsing only supports
    GMT:hhmm, GMT:+hhmm, and GMT:-hhmm.

    So, the following code works fine:

        DateTimeFormat dateFormat = DateTimeFormat
                .getFormat("EEE MMM dd HH:mm:ss zzz yyyy");
        Date date = dateFormat.parse("Thu May 31 09:45:21  GMT-07:00 2012");
        GWT.log("Date "+date);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to parse any datetime format to dd/MM/yyyy format. here is my code
I have no idea why exception was thrown, here's the working code: DateTime.Parse(1/12/2012 12:00:00
Code (Note that the result will not display properly without the images referenced) I'm
I'm updating some code that formats a date to a string using MM/dd/yy. I
i am try to parse string to date it works normally well but when
Hi I am writing a piece of code to find the latest date among
This code finds the difference between today and a fixed date. #!/usr/bin/perl use strict;
I'm trying to write a small javascript code to query data filtered by date.
I'm using the following code to display an arabic date: Dim dtFormat As DateTimeFormatInfo
i have code in csharp that returns this string: {'dateTimeFormat': 'iso8601', 'wikiURL': http://simile.mit.edu/shelf/ ,

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.