Back to Clock Service Examples Page
The UtcTimeServiceQuery example demonstrates how to query a UtcTimeService object. The example displays the universal time as returned from the UtcTimeServiceSingleton.
The universal time is obtained via the invocation of the "universal_time" operation on the UtcTimeService interface.
The source file for the UTC Time example is:
From the command line use:
server -start ClockService
Using the Administration Manager:
Start the Administration Manager, right click on the ClockService node and select Start from the pop-up menu.
run com.prismt.cos.CosClockService.examples.UtcTimeServiceQuery
You should see the universal time displayed on the standard output device.
Note: this example uses the UTC valuetype. This means that a ValueFactory object must be registered with the client-side ORB to deal with demarshalling of the UTC valuetype. This is handled in the example code.