I did have an analog clock. But it did not have digital display and it only for display purpose.
Because you ask for teaching purpose, so I modified the code and make it draggable.
I hope this is what you want.
You can drag the the arrow (for minute and hour) to change the time or change it with slider bar.
Click "show" check box to display the time in digital format.

VIEW or DOWNLOAD ejs xml source
then click to translate strings for selected locale.


Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop.