Skip to content

Can't seem to compare DateTime  #323

Closed

Description

@Thraka

This code throws an exception:

lastUpdate = DateTime.Now

if (lastUpdate < DateTime.Now):
    pass

The error is

TypeError: unorderable types: DateTime() < DateTime()

Activity

  1. vmuriart commented on Jan 12, 2017

    @vmuriart
    Contributor

    Could you provide a bit more information?

    Pythonnet version?

    Python version?

    os?

  2. Thraka commented on Jan 12, 2017

    @Thraka
    Author

    Pythonnet 2.1.0
    Python 3.5
    Windows 10 x64

  3. vmuriart commented on Jan 12, 2017

    @vmuriart
    Contributor

    Possibly related to #294

    If you want you could try running the latest dev from the ci

  4. vmuriart commented on Jan 12, 2017

    @vmuriart
    Contributor

    @Thraka replicated your issue on 2.1.0 and tested it under latest commit and its good.

  5. Thraka commented on Jan 12, 2017

    @Thraka
    Author

    Good to hear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions