1. Sergei and Lena bought the air conditioner just in time for summer.

2. The children came home just in time for dinner.

3. The runners finished the race just in time.

Google translates "just in time" as как раз вовремя, but when I enter "just in time for summer," it translates to как раз к лету, so I am not sure what the correct translation is, and when to use как раз к (dative?). Как сказать по-русски?