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

DRAFT added support for centiseconds in the TimeElementsWithFractionOfSeconds #282

Merged
merged 5 commits into from
May 4, 2024

Conversation

rick-slin
Copy link
Contributor

@joachimmetz As discussed in the plaso PR #4688, I would like to propose these change to add support for centisecond precision in TimeElementsWithFractionOfSeconds.

I think it would be easy to add 100us precision based on that template.

Thank you for your time and consideration.

Copy link

codecov bot commented Apr 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.67%. Comparing base (790074c) to head (06c1d36).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
+ Coverage   96.20%   96.67%   +0.47%     
==========================================
  Files          24       24              
  Lines        2343     2375      +32     
==========================================
+ Hits         2254     2296      +42     
+ Misses         89       79      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joachimmetz joachimmetz self-assigned this Apr 14, 2024
@joachimmetz joachimmetz self-requested a review April 14, 2024 07:56

expected_time_elements_tuple = (2010, 8, 12, 20, 6, 31)
time_elements_object = time_elements.TimeElementsWithFractionOfSecond(
fraction_of_second=decimal.Decimal(0.8742),
Copy link
Member

@joachimmetz joachimmetz Apr 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nit: 4 space continuation indentation.

@joachimmetz
Copy link
Member

@rick-slin thanks, the changes look good to me. Left a small nit and a question.


Returns:
decimal.Decimal: fraction of second, which must be a value between 0.00
and 1.00.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nit: missing continuation indentation

nanoseconds (int): number of nanoseconds.

Returns:
decimal.Decimal: fraction of second, which must be a value between 0.00
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the addition 0 in 0.00

Copy link
Member

@joachimmetz joachimmetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joachimmetz joachimmetz merged commit 0ec1ef3 into log2timeline:main May 4, 2024
10 checks passed
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.

2 participants