GCJ and invalid Date syntax

  • Thread starter Jean-Marc Desperrier
  • Start date
J

Jean-Marc Desperrier

I post just to record here a problem with gcj 3.2.3 that I found no
reference to elsewhere.

This code :
DateFormat dateIn = new SimpleDateFormat("yyyyMMddHHmmss");
Date stime = dateIn.parse("20050518140910");

will rise "invalid Date syntax" in gcj and work with sun java.

This is because that version of gcj does not expect that the element of
the date can have no separator between them.
You need to have ' ', ':', '-', something between yyyy MM and dd, etc.

Checking here what *did* work helped me out :
http://sources.redhat.com/cgi-bin/c...ateFormat/regress.java?rev=1.12&cvsroot=mauve

I'm *not* saying later versions don't correct this, had no time to
install and check.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top