
Thank you for your answer, but I have a different scenario as below mentioned:
Let's I want to make data available at the metric endpoint along with its timestamp(the time at which we got this data). But the system time is in PDT and I also want the Prometheus dashboard x-axis with this PDT time, not in(UTC or equivalent local time).
In go there is an API NewMetricWithTimestamp(time,metric)
but here time is in UTC so I need to convert my PDT time to UTC and then this API returns the data value with the timestamp in milliseconds. So on the Prometheus dashboard, we are able to see the equivalent UTC time.
There are two things to mention:
1. The timestamp within the Prometheus metric would always be in UTC regardless of the timezone of the application or Prometheus server.
2. Timestamps should pretty much never be used with metrics.
Definitely not if you are instrumenting an application, with one
of the few use-cases being connecting a third-party metrics system
into Prometheus.
-- Stuart Clark
Let's I want to make data available at the metric endpoint along with its timestamp(the time at which we got this data). But the system time is in PDT and I also want the Prometheus dashboard x-axis with this PDT time, not in(UTC or equivalent local time).