Skip to content

Do date/time infinity conversions #2039

Description

@roji

MinValue/MaxValue on DateTime and other date/time types is now mapped to PostgreSQL -infinity/infinity by default at the ADO.NET layer; the same should happen in EFCore.PG (literal SQL generation).

Check what to do with tests Where_DateOnly_Year and Where_DateOnly_ctor. Extracting a year out of infinity values yields a double precision infinity value, which cannot be cased to an int. Maybe this is OK (just update the tests to filter out infinity values), or maybe we should add a switch in the translation (infinity -> 9999 like DateTime.MaxValue, -infinity -> 0001 like DateTime.MinValue).

Activity

  1. added this to the 6.0.0 milestone on Oct 14, 2021
  2. self-assigned this
    on Oct 14, 2021
  3. changed the title [-]Handle date/time infinity values and DateTime.MinValue[/-] [+]Do date/time infinity conversions[/+] on Oct 15, 2021
  4. added a commit that references this issue on Oct 15, 2021
    be78230
  5. added a commit that references this issue on Oct 15, 2021
    6d674dd
  6. linked a pull request that will close this issueDo infinity conversions for LocalDateTime #2057on Oct 24, 2021
  7. added theissue type on Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions