Hi,
I have another question about time plotting on Dashbord2 line chart.
In mysql table has UTC timestamp and add local time column with query below. When give this data set to chart, different time scale showed up as below. The UTC is 13:00 and local_time is 0:00 but 10AM. Current NodeRED server location is Brisbane, 1 hour behind from Sydeny but still different from that. Is there anyway to show the local time as X axis scale?
SELECT CONVERT_TZ(DateTime, 'UTC', 'Australia/Sydney') as local_time, datetime,
id, stuncurrent, stunvoltage
FROM Stun_log.Stunlog1
WHERE datetime >= CONVERT_TZ(CONCAT('2024-11-17', ' 00:00:00'), 'Australia/Sydney', 'UTC')
AND datetime < CONVERT_TZ(CONCAT('2024-11-17'+ INTERVAL 1 DAY, ' 00:00:00') , 'Australia/Sydney', 'UTC')
limit 4;
[
{
"local_time": "2024-11-17T00:00:08.000Z",
"datetime": "2024-11-16T13:00:08.000Z",
"id": 12336,
"stuncurrent": 11,
"stunvoltage": 230
},
{
"local_time": "2024-11-17T00:00:18.000Z",
"datetime": "2024-11-16T13:00:18.000Z",
"id": 12337,
"stuncurrent": 11,
"stunvoltage": 240
},
{
"local_time": "2024-11-17T00:00:28.000Z",
"datetime": "2024-11-16T13:00:28.000Z",
"id": 12338,
"stuncurrent": 11,
"stunvoltage": 250
},
{
"local_time": "2024-11-17T00:00:38.000Z",
"datetime": "2024-11-16T13:00:38.000Z",
"id": 12339,
"stuncurrent": 11,
"stunvoltage": 260
}
]