webdevops / azure-devops-exporter

Prometheus exporter for Azure DevOps (VSTS) including agent pools, builds, releases, deployments, pullrequests and repo stats
MIT License
148 stars 57 forks source link

Dates/Times in UTC? #114

Open cbat98 opened 1 month ago

cbat98 commented 1 month ago

Hi, I'm not a Go developer by any means, but whilst browsing the AZDO REST API documentation, I noticed that all of the datetimes that it returns are always in UTC.

Here in the UK, we spend half of the year in daylight savings time (BST timezone rather than GMT), which puts us an hour ahead of UTC. This means that the time.Now() function in Go will be sending local time rather than UTC. I'm not sure if formatting the time to the correct specification (minTime.Format(time.RFC3339)) is supposed to alter the time in the request, but it doesn't seem to be doing so according to my AZDO IIS logs.

Can someone advise whether UTC is or is not being sent, and if it should be / should not be? I'm happy to contribute some code to augment the time.Now() calls if necessary.