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

Timestamp inconsistency before/after compression #352

Open
LinZhihao-723 opened this issue Apr 9, 2024 · 0 comments
Open

Timestamp inconsistency before/after compression #352

LinZhihao-723 opened this issue Apr 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@LinZhihao-723
Copy link
Member

Bug

When compressing a log event with a large timestamp, the decompressed timestamp is inconsistent with the original one.
Before compression: 3924-03-28 10:17:41.891
After compression: 2170-07-29 11:34:00.762
With further explorations, it was believed that this was caused by the execution of the following line:

auto timestamp_point = date::sys_days{year_month_date} + std::chrono::hours{hour}

It seems like the nanosecond precision causes the timestamp overflow; by removing line 737 the bug would be solved.

CLP version

c158852

Environment

macOS 14.2.1

Reproduction steps

echo "3924-03-28 10:17:41.891 This is a message from the future." > test.log
clp c archives test.log
clp x archives out
diff test.log out/test.log
@LinZhihao-723 LinZhihao-723 added the bug Something isn't working label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant