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

fix UTCTimeField timezone #4564

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

douniwan5788
Copy link

Checklist:

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

fixes #4557

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.71%. Comparing base (6f0faf3) to head (bf07e36).

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%) ⬇️
scapy/fields.py 92.76% <100.00%> (-0.01%) ⬇️

... and 282 files with indirect coverage changes

@gpotter2
Copy link
Member

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.

@douniwan5788
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UTCTimeField EPOCH is confusing
2 participants