Questions tagged [zoneid]
6 questions
2
votes
3 answers
Is there any way to convert ZoneOffset to ZoneId in Java 8?
I am working on a project wherer i have limited zoneid and i am getting zoneoff set from front-end so that's why i want to convert time off set into zoneid in java. is there any way to convert zoneoffset into zone id.

Ankitgiri2411
- 25
- 3
2
votes
2 answers
ZoneOffset ZoneId custom serialization
What is the best way to serialize ZoneId or ZoneOffset from format +03:00 to format +03.00 using Jackson? Or may be there is another way how to change : to .

trom
- 61
- 5
2
votes
1 answer
how to manage the timezone which are not directly supported in java
we are getting the ZoneId object by passing the id string -> ZoneId.of("US/Alaska")
While getting the timezone ids from java after passing the location name, we get error that "Exception in thread "main" java.time.zone.ZoneRulesException: Unknown…

Onki
- 1,879
- 6
- 38
- 58
1
vote
0 answers
LocalDateTime with minimum LocalDate and Timezone (ZoneId.SYSTEM)
I'm attempting to format a LocalTime object to a formatted string - but due to business requirements I also need to pass a ZoneId to allow for changing the time potentially - then I can format it.
What I have currently is something like…

Jack A
- 11
- 1
0
votes
2 answers
Java Timezone issue with LocalDate not showing correct date
I'm currently based in Europe/London
I am trying to get the current day in Samoa, which is 27 July with the following code:
LocalDate localDate = LocalDate.now(ZoneId.of("Pacific/Samoa"));
However for some reason this outputs as:
2023-07-26
It's…

Joao Pedro
- 3
- 2
-3
votes
1 answer
Failing to convert from epochmili to string
This the epoch mili - 1526581800000
The code which am using for conversion is -
LocalDateTime localDateTime =…