Analog Clock Service

Analog Clock Service is a service for providing analog clock images to web (or other) applications. Clock Service API let’s you dynamically create images of an analog clock.

Clock Service is a simple servlet implementation that generates an image with the specified parameters. API can be used to define image size (s=100), timezone (tz=zone), title (t=Helsinki) and 12h/24h format (f=24). With this I can use the following URLs to produce three different clock images for three different timezones.

/clockservice/clock?tz=America/New_York&s=150&t=Atlanta&f=12
/clockservice/clock?tz=Europe/Helsinki&s=150&t=Helsinki&f=12
/clockservice/clock?tz=Australia/Sydney&s=150&t=Sydney&f=12

If you would use these URLs with HTML IMG tags then the results would look like this:

Clock (Atlanta)Clock (Helsinki)Clock (Sydney)

These images aren’t created dynamically as I don’t have any public servlet container available.

You’ll need to run this service in a servlet container such as Apache Tomcat, GlassFish or JBoss.

License: Apache License 2.0

Downloads:

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word