Top "Java-time" questions

The java.

JSON Java 8 LocalDateTime format in Spring Boot

I'm having a small problem with formatting a Java 8 LocalDateTime in my Spring Boot Application. With 'normal' dates I have …

java json java-8 spring-boot java-time
LocalDate to java.util.Date and vice versa simplest conversion?

Is there a simple way to convert a LocalDate (introduced with Java 8) to java.util.Date object? By 'simple', I …

java date java-8 java-time
Unix epoch time to Java Date object

I have a string containing the UNIX Epoch time, and I need to convert it to a Java Date object. …

java date java-time
How to get UTC+0 date in Java 8?

I have problems with Date class in Java. Date class returns local machine date but i need UTC-0. I have …

java datetime java-8 java-time
Convert LocalDateTime to LocalDateTime in UTC

Convert LocalDateTime to LocalDateTime in UTC. LocalDateTime convertToUtc(LocalDateTime date) { //do conversion } I searched over net. But did not get …

java java-8 utc java-time
java.time.format.DateTimeParseException: Text could not be parsed at index 21

I get the datetime value as created_at '2012-02-22T02:06:58.147Z' Read-only. The time at which this task …

java datetime java-8 java-time
Format LocalDateTime with Timezone in Java8

I have the this simple code: DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss.SSSSSS Z"); LocalDateTime.now().format(FORMATTER) …

java java-8 java-time
How to extract epoch from LocalDate and LocalDateTime?

How do I extract the epoch value to Long from instances of LocalDateTime or LocalDate? I've tried the following, but …

java time java-8 epoch java-time
How to convert java.sql.timestamp to LocalDate (java8) java.time?

In Java 8, how can I convert a Timestamp (in java.sql) to a LocalDate (in java.time)?

java timestamp java-8 localtime java-time
How to get previous month and years in java?

How do I find out the last month and its year in java e.g. If today is 10th oct 2012, …

java calendar java-time