VolkovLabs / volkovlabs-dynamictext-panel

Business Text Panel for @grafana
https://docs.volkovlabs.io
Apache License 2.0
78 stars 14 forks source link

Timezone problem with the {{date}} helper #158

Closed Teckinfor closed 1 year ago

Teckinfor commented 1 year ago

Hello,

I want to display a time thanks to a timestamp but unfortunately, I always have an hour difference with the local time.

The time and the timezone of my dashboard and my VM are correctly configured

For example, 1678210200000 gives 18:30 instead of 17:30.

Thanks in advance Kind regards,

mikhail-vl commented 1 year ago

@Teckinfor I double-checked using the Static Data Source, and the date is displayed correctly for my EST timezone.

Screen Shot 2023-03-06 at 11 28 10

I need more details to investigate further. Alternatively, you can implement your own Handlebar handlers to display the timestamp to validate.

Teckinfor commented 1 year ago

After more testing, it seems that the fact that my timestamp is already in GMT+1, the panel also makes +1. And therefore that the time displayed is one hour ahead.

mikhail-vl commented 1 year ago

@Teckinfor What kind of Data Source do you use? Can you return timezone?

Data Sources and Panels expect data to be in the UTC timezone or return timezone as a part of the time. Then it will be converted correctly to the browser timezone in Grafana.

Let me know if there is anything else.