LocalTime atOffset() method in Java with Examples
The atOffset() method of a LocalTime class is used to combine this time with an offset object to create an OffsetTime object. All possible combinations of time and offset are valid.
public OffsetTime atOffset(ZoneOffset offset)
Parameters: This method accepts a single parameter offset which is the offset to combine with LocalTime Object, not null.
Return Value: This method returns the offset time formed from this time and the specified offset, not null.
Below programs illustrate the atOffset() method:
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.