How to use server time instead of client browser time

  • What Grafana version and what operating system are you using?

OS: Windows 10.
Version: Grafana8.

  • What are you trying to achieve?

I want to use the time of the grafana server instead of the client.
Not the time zone issues.

Some users’ devices are not correct in time which may delay or ahead few minutes due to some reasons (e.g., have no internet to correct time.)
It would be a problem while using the tme-series panel which would show time range based on client’s time.

For example: the grafana server’s time is: 10:00:00, the client’s time is: 09:54:00 ( delayed 6 minutes).
If the time range of dashboard is “now-6h” to “now”, the time series panel would show only 03:54:00 ~ 09:54:00. The client would miss the data between 09:54:01 and 10:00:00.

If Grafana use server’s time, then the client can see the data from 04:00:00 to 10:00:00, and I do not worry that the client may miss the newest data.

How to fix this problem?
Thanks in advance.

Hi @bomakoto221,

Welcome to the :grafana: community support forums !!

I think your question is related to the Grafana server configuration (/etc/grafana/grafana.ini) being enabled and defined correctly (as it might be missing from your configuration)

Please check this documentation link and see if you have the correct time zone defined.

Let us know if this helps.

Hello, this is exactly what we are facing now!

Did you find any solution to this please? @bomakoto221

We also face the same problem. Any solution for this issue?

Our use case are embedded devices with correct time (from GPS) and android tablets without internet connection. The tablets have a significant timeshift and therefore if the tablets clock is delayed we are missing the most recent minutes of the time series which are very important to our application. An option to make queries relative to the servers time (rather than the current client/browser time) would solve our issure.

@usman.ahmad Since the time shift between the devices varies, I think this is not an issure related to the time zone defined in the grafana configuration.