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

Include epoch microseconds in DT comparison methods. Closes #156 #157

Closed
wants to merge 1 commit into from

Conversation

timofurrer
Copy link
Collaborator

No description provided.

@kennethreitz
Copy link
Owner

This was originally done intentionally. Please make careful considerations before making this change.

@kennethreitz
Copy link
Owner

e.g. two nows generated “apparently” simultaneously, then compared equal.

I agree the microseconds are a better design decision.

@kennethreitz
Copy link
Owner

This is a major design change, though, and warrants a minor (or maybe even major) version bump.

@timofurrer
Copy link
Collaborator Author

This was originally done intentionally

What was the reason for that?

e.g. two nows generated “apparently” simultaneously, then compared equal.

Well, I hope no one bet one the that. It could easily happen that two nows generated “apparently” simultaneously would led to two datetimes with a different second and therefore not evaluate equal.

This is a major design change, though, and warrants a minor (or maybe even major) version bump.

That's right. The question even is if internally we should calculate with the total microseconds after the epoch start to avoid floating point numbers.

@timofurrer timofurrer force-pushed the master branch 2 times, most recently from a583368 to a4432ee Compare August 24, 2019 21:10
@timofurrer timofurrer force-pushed the equality-with-microseconds branch from ad41f37 to 439952e Compare August 24, 2019 21:15
@timofurrer timofurrer force-pushed the equality-with-microseconds branch from 439952e to fa1c4eb Compare August 24, 2019 21:22
@github-actions
Copy link

This Pull Request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the state label Oct 23, 2019
@github-actions github-actions bot closed this Oct 30, 2019
@timofurrer timofurrer reopened this Oct 30, 2019
@github-actions github-actions bot closed this Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants