Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Comparing between time types. #104

Closed
CPWstatic opened this issue Jun 5, 2020 · 1 comment
Closed

Comparing between time types. #104

CPWstatic opened this issue Jun 5, 2020 · 1 comment
Labels
good first issue Community: perfect as the first pull request

Comments

@CPWstatic
Copy link
Contributor

This is not a correct way to compare the time, when the timezone is being considered.

    bool operator==(const DateTime& rhs) const {
        return year == rhs.year &&
               month == rhs.month &&
               day == rhs.day &&
               hour == rhs.hour &&
               minute == rhs.minute &&
               sec == rhs.sec &&
               microsec == rhs.microsec &&
               timezone == rhs.timezone;
    }
@CPWstatic CPWstatic added the good first issue Community: perfect as the first pull request label Jun 6, 2020
@Aiee
Copy link
Contributor

Aiee commented Jul 2, 2021

This has been fixed in the master branch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Community: perfect as the first pull request
Projects
None yet
Development

No branches or pull requests

2 participants