It was raining the whole time that I was at work, but it had stopped once I left to go home.
It was raining all day at work, but it had stopped when I left to go home.
The whole time that I was at work
仕事中ずっと
夜勤じゃなければ(普通に朝から夕方までみたいなスケジュールであれば)all day at workもOKですね。
帰宅時は「when I went home」も通じると思うけど、「退勤した時」じゃなく「家に着いた時」と理解もできますのでleft to go homeにしました。
帰宅時に雨がやんでいた
ご参考になれば幸いです。