Skip to content

Commit eea44d7

Browse files
committed
Fix serialization of DateTime
DateTime objects with fixed negative UTC offset were incorrectly serialized and sent to the database. Similar issue to #616
1 parent a0263b0 commit eea44d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neo4j/time/hydration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def seconds_and_nanoseconds(dt):
167167
else:
168168
# with time offset
169169
seconds, nanoseconds = seconds_and_nanoseconds(value)
170-
return Structure(b"F", seconds, nanoseconds, tz.utcoffset(value).seconds)
170+
return Structure(b"F", seconds, nanoseconds,
171+
int(tz.utcoffset(value).total_seconds()))
171172

172173

173174
def hydrate_duration(months, days, seconds, nanoseconds):

0 commit comments

Comments
 (0)