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

Ignore timetamps with epoch 0 #3907

Open
misje opened this issue Nov 19, 2024 · 2 comments
Open

Ignore timetamps with epoch 0 #3907

misje opened this issue Nov 19, 2024 · 2 comments

Comments

@misje
Copy link
Contributor

misje commented Nov 19, 2024

timestamp(epoch=0) (where 0 is coming from VQL) results in something like "0001-01-01T00:53:28+00:53". Although this is obviously an invalid timestamp, it still steals a non-significant time from the analyst scanning cells. – It takes a moment to verify that a non-empty cell contains an invalid timestamp, and these moments add up. In my own artifacts, I add a conditional that only calls timestamp() if the input is valid, otherwise return NULL. However, it would be great if timestamp(epoch=0) would return NULL instead of a valid timestamp string with a nonsensical timestamp.

@scudette
Copy link
Contributor

This is a good question. Actually the 0 time is always exactly 0001-01-01T00:00:00Z (your example has timezone of 53 min past UTC which is unusual :-).

Replacing the time with NULL is possible but this will mess up the time comparison - for example, a filter like WHERE Timestamp < now() will return false because NULL compared to anything is false.

If this is a GUI issue we can hide those times in the GUI but keep the underlying data.

@misje
Copy link
Contributor Author

misje commented Nov 19, 2024

The issue is that the invalid value is presented as a fairly long string that takes time to visually scan/parse. I didn't really consider the data manipulation part of it, so you are right, it is a GUI-only issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants