jsr310 Questions
5
Solved
I know that:
Instant is rather a "technical" timestamp representation (nanoseconds) for computing.
LocalDateTime is rather date/clock representation including time-zones for humans.
Sti...
17
Solved
I use Spring Boot and included jackson-datatype-jsr310 with Maven:
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</...
Perutz asked 27/10, 2016 at 0:46
1
I have added the JavaTimeModule but still not able to get OffsetDateTime working on getting some data from RethinkDB
@Configuration
public class JacksonOffsetDateTimeMapper{
@Bean
@Primary
public O...
4
Solved
I am using spring-boot 1.2.1.RELEASE with jackson 2.6.2 including the jsr310 datatype. I am using the annotation @SpringBootApplication to kick off my Spring app. I have
spring.jackson.serializat...
Squab asked 5/10, 2015 at 15:27
5
Solved
I've the following field in a class I use during deserialization of a service that I'm consuming.
private ZonedDateTime transactionDateTime;
The service I'm consuming may return a Date or DateTi...
5
Solved
I'm using ThreeTen-Backport library for my Android project (because java.time is not yet implemented in android development).
When I write LocalDate today=LocalDate.now(); or LocalTime time=Local...
Disclose asked 9/7, 2016 at 12:29
3
Solved
7
Solved
I have a LocalDate variable called date, when I print it displays 1988-05-05 I need to convert this to be printed as 05.May 1988. How to do this?
2
Solved
I have a question with regards to the question Time dependent unit tests
Let's say I build Spring application which contains service interface and its implementation
If I want to change clock in ...
2
Solved
Problem: Native queries with Spring Data returning dates return java.sql.Date not java.time.LocalDate, despite the setup.
Context: A new project with Spring Boot 2.0.0.M5 (the latest), Hibernate ...
Elman asked 24/10, 2017 at 21:11
2
Solved
I'm doing a little PoC using jersey client to consume a REST service and I'm having problems with a field that is in LocalDateTime format.
The REST service response is like this:
{
"id": 12,
"i...
2
Solved
Why does java.time.Clock has zone information? From the Clock you only can get an Instant when calling the instant() method - which is a time without zone info.
Is the only purpose to have the zon...
1
Solved
I have a model class that has a field:
@JsonDeserialize(using = InstantDeserializer.class)
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSZ")
private OffsetDateTime offsetDt;
When a ...
3
Solved
I'm trying to marshal response containing ISO formatted timestamp like that:
{
...
"time" : "2014-07-02T04:00:00.000000Z"
...
}
into ZonedDateTime field in my domain model object. Eventually it...
Abacist asked 26/2, 2017 at 11:54
1
Solved
I am currently working on an Android Studio project with a minimum API version of 17 (JellyBean), so I cannot use the java.time package. Instead, I am using the ThreeTen backport for Android (com.j...
Pandect asked 7/7, 2018 at 12:27
2
I'm making a serivce client for a REST endpoint, using a JAX-RS client for the HTTP requests and Jackson to (de)serialize JSON entities. In order to handle JSR-310 (Java8) date/time objects I added...
3
Solved
JSR-310 has a handy class DateTimeFormatter which allows you to construct a DateTimeFormatter. I particularly like the pattern(String) method - see javadoc
However, I hit a problem whereby this is ...
1
Solved
It seems that the new java.time API offers everything from java.util.Date and much more.
Is there any reason to use java.util.Date when the newer java.time API is there since Java 8?
Should java.ut...
Polyandrous asked 8/2, 2018 at 15:11
1
Solved
I'm looking for a solution to calculate the months between two date. I think joda or java8 time can do it. But when I compare them I found something really weird.
import java.text.ParseException;...
Perni asked 15/9, 2017 at 5:47
3
Solved
I'm using the library described the Jackson Datatype JSR310 page but I'm still having difficulty getting it to work.
I have configured the following bean:
@Bean
@Primary
public ObjectMapper objec...
3
Solved
I am writing new project in Java 8 in company. I have suggested to use Java 8 date time API but one of my co workers says that new Date time API works slow.
Is it true? Also I want to get some off...
2
Solved
Does jOOQ provide support for JSR310 in combination with PostgreSQL? In particular, I am trying to use the following classes:
java.time.Instant
java.time.LocalDate
java.time.LocalTime
java.time.L...
1
Solved
I tried following code to use javax.time in Kotlin:
import javax.time.calendar.LocalDate
fun main(args: Array<String>){
println("Today is ${LocalDate.now()}");
}
And got compilation erro...
2
Methods such is ChronoUnit.HOURS.between(start, end) returns long so I can't get the fraction from there.
Is there an alternative method/approach that would return a fraction?
3
Solved
If I already have a date's month, day, and year as integers, what's the best way to use them to create a LocalDate object? I found this post String to LocalDate , but it starts with a String repres...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.