From 8da5db83a28aa9a97fb4b1d36d593a67bdd94a56 Mon Sep 17 00:00:00 2001 From: William Shiao Date: Tue, 12 Nov 2024 16:38:27 -0800 Subject: [PATCH 1/2] Update time docs to reflect new chrono feature flag name Changes `chrono` -> `chrono-04` to reflect the new name for the feature flag. --- docs/source/data-types/time.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/data-types/time.md b/docs/source/data-types/time.md index 03c4a524b..4816640ab 100644 --- a/docs/source/data-types/time.md +++ b/docs/source/data-types/time.md @@ -42,7 +42,7 @@ while let Some((value,)) = iter.try_next().await? { ## chrono::NaiveTime -If `chrono` feature is enabled, [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) +If `chrono-04` feature is enabled, [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) can be used to interact with the database. Although chrono can represent leap seconds, they are not supported. Attempts to convert [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) with leap second to `CqlTime` or write it to the database will return an error. From af69a1deb32bcd752aa5681a508fcc4313cd69cb Mon Sep 17 00:00:00 2001 From: William Shiao Date: Thu, 14 Nov 2024 11:17:36 -0800 Subject: [PATCH 2/2] Update the name of the `time` feature flag Also fix some previously unchanged occurences of the `chrono` feature flag. --- docs/source/data-types/date.md | 4 ++-- docs/source/data-types/time.md | 4 ++-- docs/source/data-types/timestamp.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/data-types/date.md b/docs/source/data-types/date.md index a0166db41..cebbcb480 100644 --- a/docs/source/data-types/date.md +++ b/docs/source/data-types/date.md @@ -42,7 +42,7 @@ while let Some((date_value,)) = iter.try_next().await? { ## chrono::NaiveDate -If full range is not required and `chrono` feature is enabled, +If full range is not required and `chrono-04` feature is enabled, [`chrono::NaiveDate`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) can be used. [`chrono::NaiveDate`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) supports dates from -262145-01-01 to 262143-12-31. @@ -78,7 +78,7 @@ while let Some((date_value,)) = iter.try_next().await? { ## time::Date -Alternatively, `time` feature can be used to enable support of +Alternatively, the `time-03` feature can be used to enable support of [`time::Date`](https://docs.rs/time/0.3/time/struct.Date.html). [`time::Date`](https://docs.rs/time/0.3/time/struct.Date.html)'s value range depends on feature flags, see its documentation to get more info. diff --git a/docs/source/data-types/time.md b/docs/source/data-types/time.md index 4816640ab..bcc1c2ddf 100644 --- a/docs/source/data-types/time.md +++ b/docs/source/data-types/time.md @@ -42,7 +42,7 @@ while let Some((value,)) = iter.try_next().await? { ## chrono::NaiveTime -If `chrono-04` feature is enabled, [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) +If the `chrono-04` feature is enabled, [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) can be used to interact with the database. Although chrono can represent leap seconds, they are not supported. Attempts to convert [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) with leap second to `CqlTime` or write it to the database will return an error. @@ -78,7 +78,7 @@ while let Some((time_value,)) = iter.try_next().await? { ## time::Time -If `time` feature is enabled, [`time::Time`](https://docs.rs/time/0.3/time/struct.Time.html) can be used to interact +If the `time-03` feature is enabled, [`time::Time`](https://docs.rs/time/0.3/time/struct.Time.html) can be used to interact with the database. ```rust diff --git a/docs/source/data-types/timestamp.md b/docs/source/data-types/timestamp.md index 0ddbf118d..d34a48058 100644 --- a/docs/source/data-types/timestamp.md +++ b/docs/source/data-types/timestamp.md @@ -43,7 +43,7 @@ while let Some((value,)) = iter.try_next().await? { ## chrono::DateTime -If full value range is not required, `chrono` feature can be used to enable support of +If the full value range is not required, the `chrono-04` feature can be used to enable support of [`chrono::DateTime`](https://docs.rs/chrono/0.4/chrono/struct.DateTime.html). All values are expected to be converted to UTC timezone explicitly, as [timestamp](https://docs.scylladb.com/stable/cql/types.html#timestamps) doesn't store timezone information. Any precision finer than 1ms will be lost. @@ -83,7 +83,7 @@ while let Some((timestamp_value,)) = iter.try_next().await? { ## time::OffsetDateTime -Alternatively, `time` feature can be used to enable support of +Alternatively, the `time-03` feature can be used to enable support of [`time::OffsetDateTime`](https://docs.rs/time/0.3/time/struct.OffsetDateTime.html). As [timestamp](https://docs.scylladb.com/stable/cql/types.html#timestamps) doesn't support timezone information, time will be corrected to UTC and timezone info will be erased on write. On read, UTC timestamp is returned. Any precision finer