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

Add new timestamp format: %z %Y-%m-%d %H:%M:%S.%3 #439

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/core/src/clp/TimestampPattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ void TimestampPattern::init() {
patterns.emplace_back(4, "%a %b %e %H:%M:%S %Y");
// E.g. Sun Jan 1 15:50:45 2015
patterns.emplace_back(0, "%a %b %e %H:%M:%S %Y");
// E.g. +0800 1970-01-01 08:00:00.235
patterns.emplace_back(0, "%z %Y-%m-%d %H:%M:%S.%3");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • %z is not a supported format specifier. You're probably thinking of a change that hasn't yet been fully merged. @LinZhihao-723 was working on it but he has other priorities at present.
  • We should also add a unit test for any new timestamp pattern we add.


// TODO These patterns are imprecise and will prevent searching by timestamp; but for now, it's
// no worse than not parsing a timestamp E.g. Jan 21 11:56:42
Expand Down
Loading