Hi all,
I got a problem with the object DateTimeFormatter.
I receive a date through a webservice which is : Tue Feb 04 14:19:44 EET 2014.
I use this line of code to parse it :
this.sessionExpire_.setValue(LocalDateTime.parse(sessionExpire.toString(), DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss 'EET' yyyy")));
It works on Fedora 20 but it doesn't work on windows 8 and Mac OS.
I get this exception :
Exception in thread "Thread-9" java.time.format.DateTimeParseException: Text 'Tue Feb 04 14:19:44 EET 2014' could not be parsed at index 0
at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1948)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1850)
at java.time.LocalDateTime.parse(LocalDateTime.java:492)
You can try it with this simply with this line :
LocalDateTime.parse("Fri Mar 28 00:08:39 EET 2014", DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss 'EET' yyyy"));
It's very weird because I run exactly the same code with exactly the same version of java which is java 8 released (downloaded from oracle's website).
Thanks in advance,
BR
Florian