Sam Stone
07/26/2023, 7:13 PMjava.util.Calendar
, I was adding the days in hours to avoid DST/ST crossover issues. Is instant + x.days
equivalent to calendar.set(Calendar.HOUR, 24 * x)
?kevin.cianfarini
07/26/2023, 7:24 PMx.days
yields a duration and not a calendar period. The duration of days defined by days
is 24 hours and will be inaccurate during DST.
You should use a DateTimePeriod
for your purposes.
myInstant.plus(period = DateTimePeriod(days = 5), timeZone = myTimeZone)