Skip to content

Improve tzinfo handling - #1368

Merged
robsdedude merged 19 commits into
neo4j:6.xfrom
robsdedude:feat/tzinfo-check
Dec 3, 2026
Merged

robsdedude merged 19 commits into
neo4j:6.xfrom
robsdedude:feat/tzinfo-check

Conversation

@robsdedude

@robsdedude robsdedude commented Oct 23, 2026 •

Copy link
Copy Markdown
Member
  • Emit warning when using the driver's temporal types with tzinfo implementations other than pytz's.
  • Emit warning when serializing tzinfo implementation that may result in a lossy representation of DateTime/datetime.
  • Fix pandas.Timestamp overflow during serialization.
  • Fix DateTime.__eq__ and DateTime.__hash__ running into overflows when corresponding UTC datetime is out of bounds.
  • Make DateTime.isoformat omit sub-seconds fractional if .nanoseconds == 0 to be more in line with datetime.

Closes: #1365
Closes: DRIVERS-640

 * Emit warning when using the driver's temporal types with tzinfo
   implementations other than pytz's
 * Emit warning when serializing tzinfo implementation that may result in a
   lossy representation.
 * Fix pandas.Timestamp overflow during serialization
@robsdedude
robsdedude marked this pull request as ready for review November 2, 2026 08:46
@robsdedude
robsdedude marked this pull request as draft November 2, 2026 08:47
@robsdedude
robsdedude marked this pull request as ready for review December 1, 2026 08:28
@MaxAake
MaxAake self-requested a review December 1, 2026 11:31

@MaxAake MaxAake left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✏️

Comment thread src/neo4j/time/__init__.py Resolved
Comment thread src/neo4j/time/__init__.py Resolved
@robsdedude
robsdedude requested a review from MaxAake December 1, 2026 13:16

@MaxAake MaxAake left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅

@robsdedude
robsdedude merged commit c73d26c into neo4j:6.x Dec 3, 2026
38 checks passed
@robsdedude
robsdedude deleted the feat/tzinfo-check branch December 3, 2026 09:30
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.

A zoneinfo-zoned datetime is sent an hour off in summer time, and can crash the interpreter

2 participants