Skip to content

Conversation

@herwinw
Copy link
Member

@herwinw herwinw commented Oct 18, 2024

The Time comparison does cancel out the timezone differences, so even if you did not call the method, the spec would still pass.

@herwinw herwinw self-assigned this Oct 18, 2024
@herwinw herwinw linked an issue Oct 18, 2024 that may be closed by this pull request
@herwinw
Copy link
Member Author

herwinw commented Oct 18, 2024

Todo: validate/extend checks for Time#== (or Time#<=>)

@herwinw herwinw marked this pull request as ready for review October 25, 2024 16:17
@herwinw herwinw removed their assignment Oct 25, 2024
@herwinw
Copy link
Member Author

herwinw commented Oct 25, 2024

The second commit adds some extra checks for Time#<=>. I picked CET and BRT pretty much at random for the time zones other than UTC, I wanted something before UTC and something after UTC, and these just happened to be the ones I knew from memory.

The Time comparison does cancel out the timezone differences, so even if
you did not call the method, the spec would still pass.
@andrykonchin andrykonchin merged commit 8e0b9e5 into ruby:master Nov 12, 2024
14 checks passed
@herwinw herwinw deleted the time_gmtime branch November 12, 2024 18:20
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.

Specs for Time#gmtime/Time#utc are insufficient

3 participants