fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.time.LocalDateTime;
  7. import java.time.format.DateTimeFormatter;
  8.  
  9. /* Name of the class has to be "Main" only if the class is public. */
  10. class Ideone
  11. {
  12. public static void main (String[] args) throws java.lang.Exception
  13. {
  14. System.out.println(LocalDateTime.now().format(DateTimeFormatter.RFC_1123_DATE_TIME));
  15. }
  16. }
Runtime error #stdin #stdout #stderr 0.25s 320832KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: OffsetSeconds
	at java.time.LocalDate.get0(LocalDate.java:680)
	at java.time.LocalDate.getLong(LocalDate.java:659)
	at java.time.LocalDateTime.getLong(LocalDateTime.java:720)
	at java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:298)
	at java.time.format.DateTimeFormatterBuilder$OffsetIdPrinterParser.format(DateTimeFormatterBuilder.java:3338)
	at java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2182)
	at java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1744)
	at java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1718)
	at java.time.LocalDateTime.format(LocalDateTime.java:1746)
	at Ideone.main(Main.java:14)