I suggest to do it yourself instead of using others code.
If you are using windows with opengl following steps are necessary to create a digital clock application.
Please use wglUseFontBitmaps to create the text items.
Prepare a timer[using SetTimer] which triggers in 1 second to redraw the scene.
In Timer handler you can call Draw() function to redraw the scene.
In Draw() function you can do the following things.
1. Retrieve the time and format as string[You can use GetLocalTime(), and swprintf to format the items from SYSTEMTIME structure].
2. Clear the screen.
3. Draw text to screen( By using glCallLists)
4. Call SwapBuffers to display the drawn text to screen.
Here are some ready made code.
http://www.openglprojects.in/2012/04/mini-project-on-clock-using-opengl.html
http://blog.wizche.ch/2009/04/opengl-programming-analogic-digital.html