From 1a7e16deb5dee7b667a57b347d27bf6fe5a4a6a1 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Mon, 14 Oct 2024 11:13:37 +0200 Subject: [PATCH 1/2] [Python] add remarks for time zones with temporal types --- python-manual/modules/ROOT/pages/data-types.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-manual/modules/ROOT/pages/data-types.adoc b/python-manual/modules/ROOT/pages/data-types.adoc index b993e6ad..c6388707 100644 --- a/python-manual/modules/ROOT/pages/data-types.adoc +++ b/python-manual/modules/ROOT/pages/data-types.adoc @@ -25,9 +25,11 @@ For full documentation, see link:{neo4j-docs-base-uri}/api/python-driver/current Temporal data types are implemented by the `neo4j.time` module. It provides a set of types compliant with ISO-8601 and Cypher, which are similar to those found in Python's native `datetime` module. To convert between driver and native types, use the methods `.from_native()` and `.to_native()` (does not apply to `Duration`). +This conversion is lossy, as the driver's types support nanosecond precision, while Python's native types do not. -Sub-second values are measured to nanosecond precision and the types are mostly compatible with link:https://pypi.org/project/pytz/[pytz]. -Some timezones (e.g., `pytz.utc`) work exclusively with the built-in `datetime.datetime`. +[NOTE] +The driver's temporal types are designed to be used with link:https://pypi.org/project/pytz/[pytz]. +Other `datetime.tzinfo` implementations (e.g., `datetime.timezone`, `zoneinfo`, `dateutil.tz`) are not supported and likely won't work well. For a list of time zone abbreviations, see link:https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List[List of tz database time zones]. From 61263c6f515288946dd6de753739304afc81453b Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Mon, 14 Oct 2024 14:55:35 +0200 Subject: [PATCH 2/2] positive phrase --- python-manual/modules/ROOT/pages/data-types.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-manual/modules/ROOT/pages/data-types.adoc b/python-manual/modules/ROOT/pages/data-types.adoc index c6388707..4a42e1e6 100644 --- a/python-manual/modules/ROOT/pages/data-types.adoc +++ b/python-manual/modules/ROOT/pages/data-types.adoc @@ -29,7 +29,7 @@ This conversion is lossy, as the driver's types support nanosecond precision, wh [NOTE] The driver's temporal types are designed to be used with link:https://pypi.org/project/pytz/[pytz]. -Other `datetime.tzinfo` implementations (e.g., `datetime.timezone`, `zoneinfo`, `dateutil.tz`) are not supported and likely won't work well. +Other `datetime.tzinfo` implementations (e.g., `datetime.timezone`, `zoneinfo`, `dateutil.tz`) are not supported and are unlikely to work well. For a list of time zone abbreviations, see link:https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List[List of tz database time zones].