ThreeTen-Backport error on Android – ZoneRulesException: No time-zone data files registered

For Android project you should use implementation ‘com.jakewharton.threetenabp:threetenabp:1.0.3’ Make sure you call AndroidThreeTen.init(this); before using the classes from the library. This will read the time zones data (included in the library). You can initialize the library in your Application class in the onCreate method just like it is recommended in the README.

How to use LocalDateTime RequestParam in Spring? I get “Failed to convert String to LocalDateTime”

TL;DR – you can capture it as a string with just @RequestParam, or you can have Spring additionally parse the string into a java date / time class via @DateTimeFormat on the parameter as well. the @RequestParam is enough to grab the date you supply after the = sign, however, it comes into the method … Read more

How to format LocalDate to string?

SimpleDateFormat will not work if he is starting with LocalDate which is new in Java 8. From what I can see, you will have to use DateTimeFormatter, http://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html. LocalDate localDate = LocalDate.now();//For reference DateTimeFormatter formatter = DateTimeFormatter.ofPattern(“dd LLLL yyyy”); String formattedString = localDate.format(formatter); That should print 05 May 1988. To get the period after the … Read more