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 milliSecond in Java?

I'm trying to convert ZonedDateTime to milliseconds using below code. LocalDateTime ldt = LocalDateTime.now(); ZonedDateTime zonedDateTime =ldt.atZone(ZoneId.of(""…

java epoch zoneddatetime
ZonedDateTime toString compatability with ISO 8601

I am trying to ensure that calling toString() on my ZonedDateTime Object will comply with ISO-8601 format. The documentation for …

java time java-time zoneddatetime
Set hours minutes and seconds to 00 in ZonedDateTime or Instant

I have a date string in Utc format - String dateStr = "2017-03-03T13:14:28.666Z"; And I want to convert …

java date java-8 zoneddatetime
Jackson annotation JsonFormat$Value json java.lang.NoSuchMethodError

I am using com.fasterxml.jackson.core:jackson-annotations:2.6.0 in my gradle project. Since adding com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.6.0 to …

java spring jackson json-deserialization zoneddatetime
Java 8 Time API - ZonedDateTime - specify default ZoneId when parsing

I am trying to write a generic method to return a ZonedDateTime given a date as String and its format. …

java timezone java-time datetime-parsing zoneddatetime
Java8- ZonedDateTime with DateTimeFormatter not recognizing the format

I am using the ZonedDateTime with DateTimeFormatter of Java 8. When I try to parse my own pattern it doesn't recognizes …

java-8 java-time zoneddatetime
Extracting date, hour and minute from Instant.now() generated date

I have this code that generates a date and time, ZoneId z = ZoneId.of( "Africa/Nairobi" ); Instant instant = Instant.now(); …

java datetime hour zoneddatetime java.time.instant
Convert java.sql.Timestamp to Java 8 ZonedDateTime?

Migrating Joda time to Java 8 Joda: UserObject user = new UserObject() user.setCreatedAt(new DateTime(rs.getTimestamp("columnName")));` Migrating to Java 8 …

java sql java-8 java-time zoneddatetime
Set the time-of-day on a ZonedDateTime in java.time?

How can I alter the time-of-day portion of an existing ZonedDateTime object? I want to keep the date and time …

java java-time zoneddatetime
Java - Result when compare two ZonedDateTime is not as expected

I have this code : ZonedDateTime t1 = ZonedDateTime.parse("2018-04-06T10:01:00.000+03:00"); ZonedDateTime t2 = ZonedDateTime.parse("2018-04-06T10:01:00.000-03:00"); System.…

java zoneddatetime