Skip to content

Commit

Permalink
Merge pull request #1123 from willshiao/patch-1
Browse files Browse the repository at this point in the history
Update time docs to reflect new chrono feature flag name
  • Loading branch information
Lorak-mmk authored Nov 20, 2024
2 parents 12ceb62 + af69a1d commit dbcb168
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/source/data-types/date.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/data-types/time.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/source/data-types/timestamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dbcb168

Please sign in to comment.