Current Time and Date

Version 1
    This document was generated from CDN thread

    Created by: John Katsavras on 27-05-2010 03:17:44 PM
    Hi there,
    Just wondering if there was a way of getting the current time and date set on the CallManager either through an API call or SQL.

    Subject: RE: Current Time and Date
    Replied by: David Staudt on 27-05-2010 05:02:52 PM
    Not aware of any direct API.
    Typically UCM is configured to use a NTP time server to sync its clock, so you could discover the configured NTP server and query it for its time.
    Also via CLI you can get a readout of the NTP time on UCM.  Perhaps you could script a session and parse the output:

    admin:utils ntp status
    ntpd (pid 30521) is running...
         remote           refid      st t when poll reach   delay   offset  jitter
    *    2 u  780 1024  377   49.199   -1.620   0.456
    synchronised to NTP server ( at stratum 3 
       time correct to within 45 ms
       polling server every 1024 s
    Current time in UTC is : Thu May 27 16:59:47 UTC 2010
    Current time in America/Chicago is : Thu May 27 11:59:47 CDT 2010

    Subject: RE: Current Time and Date
    Replied by: John Katsavras on 28-05-2010 09:31:58 AM
    Thanks for the responce David,
    I cant really depend on there been an NTP server as there are allot of CM out there that dont have one setup (I know in ver 8 NTP is mandatory).
    The only way i was thinking you could do it was to send an API request (any would do) to the CM and when the CM responce look at the time stamp on the http/SOAP responce.. I was hopping there be a more elegant way of doing it