Temporal changes exist in clinical trials. Over time, shifts in patients' characteristics, trial conduct, and other features of a clinical trial may occur. In typical randomized clinical trials, temporal effects, that is, the impact of temporal changes on clinical outcomes and study analysis, are largely mitigated by randomization and usually need not be explicitly addressed. However, temporal effects can be a serious obstacle for conducting clinical trials with complex designs, including the adaptive platform trials that are gaining popularity in recent medical product development. In this paper, we introduce a Bayesian robust prior for mitigating temporal effects based on a hidden Markov model, and propose a particle filtering algorithm for computation. We conduct simulation studies to evaluate the performance of the proposed method and provide illustration examples based on trials of Ebola virus disease therapeutics and hemostat in vascular surgery.