You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
(From Jon:) Currently, FixedDateTimeZone overrides Equals(object) to compare
itself with other fixed zones, but other time zones don't. (Malcolm: This is
bad for e.g. ZonedDateTime's Equals(object) implementation.)
It would be useful for zones to implement equality sensibly. In particular,
asking a single IDateTimeZoneSource for a zone with the same ID should yield
references to equal objects, even if they're two separate objects.
Whether two zones from *separate* sources which share the same original source
data are equal is probably best left to be source-specific, although it would
be preferable if they were.
(Malcolm: See also issue 65 for some more of the above.)
If we make DateTimeZone implement IEquatable<DateTimeZone> but with an abstract
Equals(DateTimeZone) method, this will force implementations to at least
acknowledge that they ought to be doing something sensible. It can also
override Equals(object) to call Equals(DateTimeZone) appropriately so this can
be done in just one place.
Original issue reported on code.google.com by malcolm.rowe on 11 Jul 2012 at 12:33
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
malcolm.rowe
on 11 Jul 2012 at 12:33The text was updated successfully, but these errors were encountered: