Top "Zoneddatetime" questions

`ZonedDateTime` is a standard Java class representing a “date-time with a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00 Europe/Paris.

How to convert ZonedDateTime to Date?

I am trying to set a server agnostic date time in my database and I believe the best practice to …

java java-8 java.util.date datetime-conversion zoneddatetime
Converting string to Instant

I am trying to covert datetime in string to instant using java 8 or utils package. For eg. String requestTime = "04:30 PM, …

java date timezone zoneddatetime java.time.instant
Is there any way to convert ZoneId to ZoneOffset in java 8?

I have an epoch second and a zoneId,by method1.It can be convert to LocalDateTime with system default zoneId,…

java java-8 java-time zoneddatetime java.time.instant
How to format a ZonedDateTime to a String?

I want to convert a ZonedDateTime to a String in the format of ("dd/MM/yyyy - hh:mm"). I …

java string java-time zoneddatetime
How to convert any Date time to UTC using ZonedDateTime or Java 8

I am trying to convert date 06-12-2015 02:10:10 PM from default zone to UTC using ZonedDateTime. LocalDateTime localDateTime = LocalDateTime.ofInstant(…

java date java-8 zoneddatetime
Convert ZonedDateTime to LocalDateTime at time zone

I have an object of ZonedDateTime that is constructed like this ZonedDateTime z = ZonedDateTime.of(LocalDate.now().atTime(11, 30), ZoneOffset.UTC); …

java java-8 timezone datetime-conversion zoneddatetime
Jackson serializes a ZonedDateTime wrongly in Spring Boot

I have a simple application with Spring Boot and Jetty. I have a simple controller returning an object which has …

java json spring-boot jackson zoneddatetime
ZonedDateTime to UTC with offset applied?

I am using Java 8 This is what my ZonedDateTime looks like 2013-07-10T02:52:49+12:00 I get this value as z1.…

java datetime java-8 utc zoneddatetime
Java 8: How to create a ZonedDateTime from an Epoch value?

Java 8's LocalDateTime has an ofEpochSecond method. Unfortunately, there is no such method in the ZonedDateTime. Now, I have an …

java java-8 epoch zoneddatetime
Can't convert string to ZonedDateTime: DateTimeParseException

I try to convert string from JSON to ZonedDateTime just like static String getWatchTime(JSONObject aJson, JSONObject bJson) { long difference = 0 ; …

java json datetime-parsing zoneddatetime