Astronomical and digital clocks