to be on time vs to be in time

Hi, teachers!
i am very curious to know what is the difference between “to be on time” and " to be in time". Will there be any misunderstanding if i use on time instead of in time and viceversa.
Thanks in advance.

As far as I know

to be on time means there is a specific time you have to get to somewhere in

Ex: Although I woke up late ,I managed to get to school ON time (let’s say 7 o’clock)

or an appointment with someone.

But (In time) means In good - best time

Ex: The firemen reached the house IN time and managed to save the man.

There’s no appointmen between the man and the firemen .

britishcouncil.org/learnengl … n-time.htm

Thanks for helping me