Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to select hour greater than 12 in timestamp filtering #550

Closed
tamimkh opened this issue Dec 18, 2020 · 1 comment · Fixed by #551
Closed

Unable to select hour greater than 12 in timestamp filtering #550

tamimkh opened this issue Dec 18, 2020 · 1 comment · Fixed by #551
Labels
bug Something isn't working ui Need an ui update

Comments

@tamimkh
Copy link
Contributor

tamimkh commented Dec 18, 2020

When viewing topic data, if a time greater than 12:30 is selected in the date picker or an hour greater than 12 is passed via the timestamp parameter, the hour is always converted to something between 0 and 12. This prevents searching via timestamp for messages that occur after 12:59 on any given day.

The cause seems to be the format string used to format the timestamp parameter which has been incorrectly specified as YYYY-MM-DDThh:mm:ss.SSS instead of YYYY-MM-DDTHH:mm:ss.SSS causing the hour to always be converted to a number between 0-12 instead of 0-23.

I am happy to create a PR to fix this if it helps

@tchiotludo tchiotludo added bug Something isn't working ui Need an ui update labels Dec 18, 2020
@tchiotludo
Copy link
Owner

hi @tamimkh, thanks for the report.
PR are welcome 👍

tchiotludo pushed a commit that referenced this issue Dec 22, 2020
When filtering topic data by `timestamp` and also when fetching offsets
for consumer groups by `datetime` we seem to be formatting the hour of
the timestamp using `hh`. In moment.js, this causes the hour to always
have a range between [0-12](https://momentjs.com/docs/#/displaying/format/)
even though even though the api expects a range between 0-24. This prevents
filtering of timestamp or fetching of offsets for any time greater than 12:59
on any given day.

This PR corrects this by changing `hh` to `HH` on the formatting calls.

close #550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui Need an ui update
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants