The time required by a pendulum to complete an oscillation is given by the relation T = 2*pi*sqrt (L/g) where L is the length of the pendulum and g is the acceleration due to gravity. Temperature does not have any place in this equation.
Therefore a pendulum's time period should not be influenced by a change of temperature in the room. But the pendulum of a pendulum clock is made of metal which expands and contracts with temperature and as a result the length of the pendulum is altered. This may be responsible for a pendulum clock speeding up or slowing down with a change in room temperature. To compensate for this, varies techniques are used to ensure that the affect of temperature is kept as small as possible.
We'll write T*and t*, the period and temperature for a proper functioning of the pendulum
T-is the period at the given temperature t.
In D=24 hours, the clock makes N=D/T oscillations, and each oscillation moves the index of the quadrant with T*(meaning that each oscillation, no matter it's time span, the clock recording it as T*).
The time recorded in D=24h, is:
D+delta tau= NT*=DT*/T.
The time recorded is inverse proportional to the period.
delta tau=-D(T-T*)/T=-[(alfa/2)delta t]/[1+(alfa/2)(t-t*)]
delta tau= -(1/2)D*alfa*delta t.
So, if the temperature of the room is increasing with t>t*, the clock is delaying:
delta tau=-(1/2)*24*3600 s*20*10^()-6*5= -5 s