Skip to main content
9 votes
7 answers
1k views

I need to iterate through the whole hours of an interval of a particular day. So given the time at one whole hour on the day in question, say, 01:00, how do I find the next whole hour? The next whole ...
Anonymous's user avatar
  • 87.4k
0 votes
0 answers
35 views

I am writing integration test using H2 with following setup datasource.url=jdbc:h2:mem:service;MODE=PostgreSQL;DB_CLOSE_ON_EXIT=FALSE;DATABASE_TO_LOWER=TRUE;DEFAULT_NULL_ORDERING=HIGH;INIT=RUNSCRIPT ...
nehamansha's user avatar
-2 votes
1 answer
126 views

I have an object Date - without a timestamp - thats because of reasons. I use the epoch to get it into a ZonedDateTime - so the epoch is the start of the day at 00:00. java.util.Date d = rs.getDate (&...
chris01's user avatar
  • 12.7k
1 vote
1 answer
161 views

This code is trying to construct a OffsetDateTime from ZonedDateTime/LocalDatimeTime at Paris timezone. ZoneId paris = ZoneId.of( "Europe/Paris" ); OffsetDateTime offsetDateTime = ...
SoT's user avatar
  • 1,267
2 votes
2 answers
258 views

I am in +07:00 timezone. Given this: ZonedDateTime.of( LocalDateTime.of( 1899, 12, 31, 23, 9, 20, 0 ), ZoneOffset.UTC ) .withZoneSameInstant( ZoneId.of( "Europe/Paris" ) ) Would produce: ...
SoT's user avatar
  • 1,267
0 votes
0 answers
39 views

I am converting a JSON to an object and it's giving me the following error: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type java.time.LocalDateTime not supported ...
smukh's user avatar
  • 89
1 vote
1 answer
226 views

I would like to make a REST call to a partner system, with Json object in the body. We use ZonedDateTime, and I need to send the dates in the format "2025-01-05T21:41:24.195Z". Currently it ...
RekaK's user avatar
  • 113
0 votes
1 answer
436 views

Working scenario: Service-A : with Java 8 , Spring boot 2.7.x Setting the ZoneddateTime ("America/New_York") in java object and adding it in RabbitMQ queue. Service-B : with Java 8 , ...
vthangar's user avatar
  • 114
2 votes
1 answer
556 views

I have a java ZonedDateTime which I am trying to insert into a MySQL Date column (the DBA refuses to change the type - the date should have a time component since it is an audit date/time for when an ...
Some User's user avatar
0 votes
1 answer
466 views

I have an entity called "Turno" that has an attribute ZonedDateTime. @Column(name = "fecha", nullable = false) @Temporal(TemporalType.TIMESTAMP) private ZonedDateTime ...
Martin Isasmendi's user avatar
0 votes
2 answers
425 views

I am using Java 17. I am trying to parse different strings as ZonedDateTime but when I try to convert it to an Instant, the output is not as expected. For eg: String first = "2020-01-...
jainilvachhani's user avatar
0 votes
1 answer
101 views

I have this Object, which has a field that is a ZonedDateTime: import java.time.ZonedDateTime; public class TestObject { private ZonedDateTime testTime; public ZonedDateTime getTestTime() { ...
Salvatore Grazioso's user avatar
3 votes
1 answer
464 views

I migrated this code: import org.joda.time.DateTime; @Entity @Table(name = "purchases") @Getter @Setter public class Purchases { @Column(name = "purchase_time") @Type(type = &...
Peter Penzov's user avatar
  • 1,102
2 votes
1 answer
780 views

I have this date string coming in through JSON: "29-OCT-21 12.00.00.000000000 AM UTC". I want to save it as a ZonedDateTime data type. I have the property set in the model as such: @...
Catherine S.'s user avatar
-1 votes
3 answers
227 views

How could I manage to get the result of 2023-11-16T09:54:12.123 using the ZonedDateTime object in Java 11? I wrote: zdt.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) and got ISO_LOCAL_DATE_TIME: 2023-...
Ademir Constantino's user avatar

15 30 50 per page
1
2 3 4 5
24