Reliability is crucial for time synchronization in Wireless Sensor Networks (WSNs). Existing time synchronization algorithms provide on average good synchronization in laboratory environment, however, outdoor environment associated with radio interference will influence the performance of time synchronization. In this paper, we proposed a Reliable Time Synchronization Protocol (RTSP) which is designed to adapt topology changes due to link failures or node mobility. RTSP works in a level fashion: each level means the nodes in this level have the same hop. MAC layer time-stamping and linear regression is adopted to compensate clock drift. Compensation mechanism and random time source choice mechanism is introduced to make synchronization robust against link and node failures. The protocol is implemented on the SIA2420 platform using TinyOS and the result show the reliability of our protocol.