How to configure Influxdb timestamp columns (Flux query) into 24hr format

Hello Everyone !
Is there a way to set the timestamp AM / PM in 24 hrs in Influxdb. Because, now i have an issue while querying. While doing a flux query, and getting the results, And with _start and _stop and other custom fields timestamp shows in 12 hours format only, which is wrong. So if i can set the timestamps into 24 hrs. format, then output will be correct !
How can I change it to 24 hrs.’ format in Influxdb. (I am using Influxdb 2.5) Is there any command can be executed to change the timestamp to 24 hrs.

In the above image, the correct _start time is mentioned in blue color. and the time which is showing is wrong format i.e. 07:57
Thanks in advance !

You can edit the table time format under customize (next to the graph selection drop down)

However I believe this is a bug that no one has taken the time to fix because you can select many formats and there is no way to use the 24 hrs. I think that this was not the case back in the day on InfluxDB 2.0.9 I started noticing this after 2.3 but I may be wrong :thinking:.

If you select raw data or simple data you can see the time on 24 hrs UTC

Hi @fercasjr ,
Thanks for your reply.

Please see the above, screenshot. I just checked what you have mentioned. But that gives only different date formats. Not talk about AM / PM in 12 hrs or 24 Hrs format.
I have checked in my local computer influxdb, and there its working fine.

But in one of the server, when I am using range () and checking last specific hours and future hours data, _start and _stop timestamp gives wrong time. For example, if the correct time of _start supposed to be 17:28, in the output its giving 05:28. So I am assuming its a setting fault in my server may be, as its always returns 12 hrs format time.

You can check my first screenshot attached. Always there is 12 hrs difference in time.

Any suggestion on this, please reply. Thanks in advance !

HH:mm:ss should be 24, hh:mm:ss should be 12 that is why I said I believe that it os a bug in the software.

Doesn’t work for me either.

Obtener Outlook para Android

In that case, I need to revert back to InfluxDB 2.1.1 or 2.0 ?
What you suggest.
As in the current one InfluxDB v2.5.1 I see this issue.

I verified the same in InfluxDB 2.1.1 and i can see timestamps works as per selection from Customize !
Where as in version 2.5.1 its not working as expected!

I don’t think you should revert back; it depends on how are using your data. I mean the timestamps are correct, they are just not being displayed correctly in the table view mode it is a pain in the ass to debug because I need to keep track on mi mind if it is am or pm. but other than that there is no problem with the data itself.

for example, I use my data on a grafana dashboard and in there the timestamps are displayed correctly and I can choose between other formats if I need or want.

for other use cases I don’t really display the timestamps just counts or averages, so it doesn’t really matter to me.

Greetings of the day !
couple of months back we were discussing on this topic.
I see its still there. Mostly its working in Grafana dashboard.
In my case, I am not using Grafana, instead using in a customized setup using Apache ECharts with Angular as frontend and Java SpringBoot /API with influx dB as backend.
If _time, _stop and _time column timestamps shows in 12 hours format then, its bit difficult for me to get the correct counts as per my requirement.
Any suggestions, highly appreciated.

Hi, this was a bug I found and that was only on the InfluxDB User Interface, you shouldn’t have that issue on your client. you should be able to use and transform to the correct time format you use, just take into account that InfluxDB by default uses UTC.

1 Like

Thank you !
Yes even i found the same. And considering UTC as the default time for InfluxDB and doing necessary changes at the client level.
Also I found that the same issue still persist there in 2.7 version.

Best Regards,