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

Use a different dateparser #9

Open
haydenflinner opened this issue Jun 24, 2023 · 0 comments
Open

Use a different dateparser #9

haydenflinner opened this issue Jun 24, 2023 · 0 comments

Comments

@haydenflinner
Copy link
Owner

haydenflinner commented Jun 24, 2023

The dateparser chosen does weird things with a default date and a default time.
Instead, it should return something like Option<Date, Time>. Or, frankly, there's probably no reason to support log lines which have only dates but no timestamps. But the 'default_time' thing is spooky and there is parsing time spent on trying to parse things that don't have timestamps.
It would be better to lift the default_day crap out of the library, leaving it to the user at use-time to decide what to do.
Also it could likely be much faster, see the qsv version.

Problems:

  • Panics the process on windows while users are typing dates to be validated in g
  • Supports a lot of formats we don't care about
  • Didn't support 09:09:09.1234 timestamps until we forked it
  • Default_day wasn't a thing, but default_time was, which indicates opposite use-case intended from us
  • Doesn't remember what the last successful parse-style was and prioritize that
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

1 participant