Skip to content

Commit bb961ed

Browse files
committed
Disable chrono's "oldtime" feature to drop time v0.1
The latest version of chrono, v0.4.16, permits removing its dependency on the long-deprecated time v0.1 crate by disabling the "oldtime" feature. For backwards compatibility, chrono is leaving the "oldtime" feature on by default, so disabling the "oldtime" feature requires disabling all default features and then re-enabling the one default feature ("clock") that rust-postgres needs. Note that this change does not cause any backwards-compatibility problems for users of rust-postgres. The "oldtime" feature controls only whether `time_v01::Duration` and `chrono::Duration` are the same type and does not affect any of the APIs used by rust-postgres.
1 parent eabcc28 commit bb961ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

postgres-types/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ postgres-protocol = { version = "0.5.0", path = "../postgres-protocol" }
2828
postgres-derive = { version = "0.4.0", optional = true, path = "../postgres-derive" }
2929

3030
bit-vec-06 = { version = "0.6", package = "bit-vec", optional = true }
31-
chrono-04 = { version = "0.4", package = "chrono", optional = true }
31+
chrono-04 = { version = "0.4.16", package = "chrono", default-features = false, features = ["clock"], optional = true }
3232
eui48-04 = { version = "0.4", package = "eui48", optional = true }
3333
geo-types-04 = { version = "0.4", package = "geo-types", optional = true }
3434
geo-types-06 = { version = "0.6", package = "geo-types", optional = true }

tokio-postgres/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ env_logger = "0.7"
5858
criterion = "0.3"
5959

6060
bit-vec-06 = { version = "0.6", package = "bit-vec" }
61-
chrono-04 = { version = "0.4", package = "chrono" }
61+
chrono-04 = { version = "0.4", package = "chrono", default-features = false }
6262
eui48-04 = { version = "0.4", package = "eui48" }
6363
geo-types-04 = { version = "0.4", package = "geo-types" }
6464
geo-types-06 = { version = "0.6", package = "geo-types" }

0 commit comments

Comments
 (0)