grafana-json-datasource
grafana-json-datasource copied to clipboard
Incorrect value of $__unixEpochTo() macros
I set panel time shift to '1d/d' so the start and end time will be aligned with 0 o'clock.
$__unixEpochFrom()
expanded to 1632067200
=> 2021-09-20 00:00:00, which is correct.
But $__unixEpochTo()
expanded to 1632758399
=> 2021-09-27 23:59:59, 1 second ahead of the end time.
Tried other data source like Prometheus, the time range is correct, which is 1632067200
to 1632758400
.
Not sure why this is different, as I'm using range from the official API:
https://github.com/marcusolsson/grafana-json-datasource/blob/779ba3d3bedb160efd0cb15c1bc346d78af58864/src/datasource.ts#L241-L242
If anyone wants to have a look, I'd welcome a pull request!