Top "Java-time" questions

The java.

Get original pattern String given a JDK 8 DateTimeFormatter?

Related to my question here - how do I get the original pattern String given a DateTimeFormatter?

java java-8 datetime-format java-time
java.time.format.DateTimeParseException could not be parsed at index 0

I am trying to tell Gson how to parse LocalDateTime and LocalDate, but I'm getting this error, which looks to …

java gson java-time datetime-parsing localdate
String of date to OffsetDateTime

I am converting string of date/datetime to OffsetDateTime and I have datetime format which may have one of these …

java-8 java-time datetimeoffset datetime-parsing
How to query LocalDateTime with LocalDate?

I've got a class which contains an atttribute of java.time.LocalDateTime type. public class MyClass{ // ... private LocalDateTime fecha; // ... } I'm …

java spring spring-data java-time spring-repositories
Jackson Java 8 DateTime serialisation

Jackson operates java.time.Instant with WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS (READ_ as well) enabled by default. jackson-datatype-jsr310 It produces …

timestamp java-8 milliseconds java-time jackson-modules
How to convert java.time.ZonedDateTime to XMLGregorianCalendar?

Is there any short way to convert java.time.ZonedDateTime to XMLGregorianCalendar? Maybe I need some intermediate steps like convert …

java datetime jax-ws java-8 java-time
Confusion with Java Time parsing UTC

I am confused with time handling in java time. I so long worked under the assumption that if a timestamp …

java parsing datetime java-time localtime
Android N Java8 java.time

I updated to the latest Android N sdk. The only thing I don't understand is why I cannot import java.…

android java-8 java-time android-7.0-nougat
How to convert timestamp string to epoch time?

I have time stamp in format 2017-18-08 11:45:30.345. I want to convert it to epoch time, so I am doing …

java timestamp epoch java-time datetime-parsing
Is there a reason for java.time.ZoneId not including an Enum of ZoneIds?

To get a ZoneId it goes like: ZoneId.of("America/Sao_Paulo"); or ZoneId.of(ZoneId.SHORT_IDS.get("BET")); …

java java-8 timezone java-time