scapy icon indicating copy to clipboard operation
scapy copied to clipboard

fix UTCTimeField timezone

Open douniwan5788 opened this issue 1 year ago • 3 comments

Checklist:

  • [x] If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • [x] I squashed commits belonging together
  • [x] I added unit tests or explained why they are not relevant
  • [x] I executed the regression tests (using cd test && ./run_tests or tox)
  • [x] If the PR is still not finished, please create a Draft Pull Request

fixes #4557

douniwan5788 avatar Oct 10 '24 12:10 douniwan5788

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 78.71%. Comparing base (6f0faf3) to head (bf07e36). :warning: Report is 163 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4564      +/-   ##
==========================================
- Coverage   81.61%   78.71%   -2.91%     
==========================================
  Files         356      331      -25     
  Lines       85545    80350    -5195     
==========================================
- Hits        69819    63245    -6574     
- Misses      15726    17105    +1379     
Files with missing lines Coverage Δ
scapy/data.py 88.30% <100.00%> (-1.98%) :arrow_down:
scapy/fields.py 92.76% <100.00%> (-0.01%) :arrow_down:

... and 282 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 10 '24 12:10 codecov[bot]

What protocols would use this? It seems weird to me to specify a time zone in the protocol field... especially in the UTCTimeZone which clearly does... UTC.

gpotter2 avatar Oct 10 '24 19:10 gpotter2

A universal Time Field can be used everywhere. I thought the UTCTimeField meant that the value in this field is stored as UTC, and we can display it in a more useful local timezone. Should I rename the tz to astz to make it clearer?

douniwan5788 avatar Oct 11 '24 04:10 douniwan5788

I don't understand the use case, please provide a proto example that uses this.

gpotter2 avatar Sep 15 '25 20:09 gpotter2