Skip to content

fix(protocols): PCAP-NG timestamps outside Windows' fromtimestamp range render as 1970 #2099

Closed

Description

@JarryShaw

Job 120605026883, the first Windows run of #2095's leg: test_pcapng_tzone_tsoffset_range_1340_unit::test_tsoffset_in_range_is_unchanged fails for -62135510400 and 253402214399 with PCAP-NG: [Block 6] invalid timestamp, and the frame is dated 1970.

Inferred (the log does not show which exception): Windows' datetime.fromtimestamp(..., tzone) cannot handle these in-range year-1 and year-9999 epochs, so the fallback fires.

Proposed: compute datetime(1970, 1, 1, tzinfo=utc) + timedelta(seconds=…) and then .astimezone(tzone), which does not depend on the C runtime. This is a #2060 phase-2 prerequisite.

Activity

  1. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 23, 2026
  2. moved this to Pending in PyPCAPKiton Oct 23, 2026
  3. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 23, 2026
  4. moved this from Pending to WIP in PyPCAPKiton Oct 23, 2026
  5. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 24, 2026
  6. added this to the PyPCAPKit v1.5 milestone on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions