Skip to content

Commit f0228e5

Browse files
committed
bump chrono to 0.4.38 and adopt changes
https://github.com/chronotope/chrono/releases/tag/v0.4.31
1 parent 0b5acb5 commit f0228e5

File tree

3 files changed

+71
-7
lines changed

3 files changed

+71
-7
lines changed

Cargo.lock

Lines changed: 67 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

database/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ anyhow = "1"
1313
async-trait = "0.1"
1414
tokio = { version = "1.6", features = ["sync", "macros"] }
1515
intern = { path = "../intern" }
16-
chrono = { version = "0.4", features = ["serde"] }
16+
chrono = { version = "0.4.38", features = ["serde"] }
1717
reqwest = { version = "0.11", features = ["blocking"] }
1818
postgres-native-tls = "0.5"
1919
native-tls = "0.2"

database/src/pool/sqlite.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
CompileBenchmark, Date, Profile,
55
};
66
use crate::{ArtifactIdNumber, Index, QueuedCommit};
7-
use chrono::{DateTime, NaiveDateTime, TimeZone, Utc};
7+
use chrono::{DateTime, TimeZone, Utc};
88
use hashbrown::HashMap;
99
use rusqlite::params;
1010
use rusqlite::OptionalExtension;
@@ -952,7 +952,7 @@ impl Connection for SqliteConnection {
952952
include: row.get(3).unwrap(),
953953
exclude: row.get(4).unwrap(),
954954
runs: row.get(5).unwrap(),
955-
commit_date: row.get::<_, Option<i64>>(6).unwrap().map(|timestamp| Date(NaiveDateTime::from_timestamp_opt(timestamp, 0).unwrap().and_utc()))
955+
commit_date: row.get::<_, Option<i64>>(6).unwrap().map(|timestamp| Date(DateTime::from_timestamp(timestamp, 0).unwrap()))
956956
})
957957
})
958958
.collect::<Result<Vec<_>, _>>()
@@ -983,7 +983,7 @@ impl Connection for SqliteConnection {
983983
include: row.get(3).unwrap(),
984984
exclude: row.get(4).unwrap(),
985985
runs: row.get(5).unwrap(),
986-
commit_date: row.get::<_, Option<i64>>(6).unwrap().map(|timestamp| Date(NaiveDateTime::from_timestamp_opt(timestamp, 0).unwrap().and_utc()))
986+
commit_date: row.get::<_, Option<i64>>(6).unwrap().map(|timestamp| Date(DateTime::from_timestamp(timestamp, 0).unwrap()))
987987
})
988988
},
989989
)

0 commit comments

Comments
 (0)