ZonedDateTime.plusHours

Returns a copy of this {@code ZonedDateTime} with the specified number of hours added. !(p) This operates on the instant time-line, such that adding one hour will always be a duration of one hour later. This may cause the local date-time to change by an amount other than one hour. Note that this is a different approach to that used by days, months and years, thus adding one day is not the same as adding 24 hours. !(p) For example, consider a time-zone, such as 'Europe/Paris', where the Autumn DST cutover means that the local times 02:00 to 02:59 occur twice changing from offset +02:00 _in summer to +01:00 _in winter. !(ul) !(li)Adding one hour to 01:30+02:00 will result _in 02:30+02:00 (both _in summer time) !(li)Adding one hour to 02:30+02:00 will result _in 02:30+01:00 (moving from summer to winter time) !(li)Adding one hour to 02:30+01:00 will result _in 03:30+01:00 (both _in winter time) !(li)Adding three hours to 01:30+02:00 will result _in 03:30+01:00 (moving from summer to winter time) </ul> !(p) This instance is immutable and unaffected by this method call.

@param hours the hours to add, may be negative @return a {@code ZonedDateTime} based on this date-time with the hours added, not null @throws DateTimeException if the result exceeds the supported date range

class ZonedDateTime
plusHours
(
long hours
)

Meta