Delays in gene networks result from the sequential nature of protein assembly. However, it is unclear how models of gene networks that use delays should be modified when considering time-dependent changes in temperature. This is important, as delay is often used in models of genetic oscillators that can be entrained by periodic fluctuations in temperature. Here, we analytically derive the time dependence of delay distributions in response to time-varying temperature changes. We find that the resulting time-varying delay is nonlinearly dependent on parameters of the time-varying temperature such as amplitude and frequency, therefore, applying an Arrhenius scaling may result in erroneous conclusions. We use these results to examine a model of a synthetic gene oscillator with temperature compensation. We show that temperature entrainment follows from the same mechanism that results in temperature compensation. Under a common Arrhenius scaling alone, the frequency of the oscillator is sensitive to changes in the mean temperature but robust to changes in the frequency of a periodically time-varying temperature. When a mechanism for temperature compensation is included in the model, however, we show that the oscillator is entrained by periodically varying temperature even when maintaining insensitivity to the mean temperature.