DynamicTimeDifference

delphimoon

Dynamic Time Difference

Algorithms

Top  Previous  Next

 

Calculates the difference between UTC and dynamic time

 

funotion DynamicTimeDifference(date:TDateTime): extended;

 

Description

Calculates the difference between UTC and dynamic time in seconds. UTC is defined by the rotation of the earth which is changing mainly due to tidal effects. To make sure the UTC stays in sync with the actual time leap seconds are inserted occasionally. However, the astronomioal calculations need a continuous time frame, the dynamic time. This function returns the offset for any time (in 2001 it is 64 seconds) - since 1972 the number of leap seconds, from 1961 to 1972 the offset was calculated with a (changing) formula. Before 1961 the difference is interpolated from old astronomical observations like solar eclipses, and for future times an extrapolation is used. Due to the fact that the changes of the earth's rotation are unpredictable this extrapolation can turn out wrong as well, so it needs to be handled with care.

What time frame the TDateTime is using is not defined, mostly it will be used as UTC, but as it is a float internally it cannot handle leap seconds, thus it would be better to use it as dynamic time. So it depends on the actual usage if this functions needs to be called for the calculation of an astronomical time or not. Notice that this conversion isn't needed for the sun rise and set times - due to the definition of the UTC the effects of the time frame change and the slowing of the earth rotation cancel out.

 

Reference

This function is based upon chapter 10 (9) of "Astronomical Algorithms".