Learning to tell the time