Skip to content

Timestamp inconsistency before/after compression #352

Open
@LinZhihao-723

Description

@LinZhihao-723

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions