I couldn't find it in the REST API, but maybe something like:

    echo 'println new Date()' | java -jar jenkins-cli.jar -s $JENKINS_URL 
groovy =

jenkins-cli.jar is available from your $JENKINS_URL/cli. The equals sign at the 
end is not a typo.

-- Sami

Tom Denley <[email protected]> kirjoitti 30.7.2012 kello 17.21:

> Is there any way to determine the current time on a Jenkins instance through 
> its REST API?
> 
> I make use of the Jenkins REST API, and frequently come across resources 
> containing a timestamp field, from which I would like to calculate a duration 
> -- by subtracting from the current time.  Unfortunately, I am having trouble 
> getting a value for the current timestamp of the Jenkins server, and using 
> local time leaves me open timezone problems.
> 
> Any help/advice gratefully received.
> 
> -T

Reply via email to