This paper proposes a filter-based distributed protocol to realize time synchronization under time-varying clock parameters. The proposed protocol is derived from a first-order controller and is fully distributed, meaning that by relying merely on its local clock readings and reading announcements from its neighbouring sensor nodes, each node in WSNs can dynamically update its virtual clock and bound synchronization error to a steady state. We analyzing the input-to-state stable stability of the control system which could guarantee convergence properties in terms of time-vary clock parameters. Simulation results are given to illustrate the performance of this control protocol.