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

refactor: Change the inner structure of DateTime #267

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

Conversation

sorairolake
Copy link
Contributor

Hold the values ​​as packed date and packed time. This is the same as MS-DOS date and time which is the time representation in ZIP. Note that the second resolution is changed to 2 seconds.

This change reduces the size of DateTime from 8 bytes to 4 bytes.

mem::size_of mem::align_of
Before 8 2
After 4 2

@sorairolake sorairolake force-pushed the change-datetime-inner-structure branch 4 times, most recently from 9f3845f to 06d31e0 Compare December 2, 2024 12:33
Hold the values ​​as packed date and packed time. Note that the second
resolution is changed to 2 seconds.
@sorairolake sorairolake force-pushed the change-datetime-inner-structure branch from 06d31e0 to 9f4d1b8 Compare December 25, 2024 06:16
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.

1 participant