Adjusted clock example to use new Date API.