Skip to content

Commit 86d72fc

Browse files
authored
Merge pull request #74 from cakebaker/bump_chrono
Bump `chrono` and `iana-time-zone`; fix use of deprecated function
2 parents ba19b94 + bbcafc4 commit 86d72fc

File tree

3 files changed

+48
-62
lines changed

3 files changed

+48
-62
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ readme = "README.md"
99

1010
[dependencies]
1111
regex = "1.10.4"
12-
chrono = { version="0.4", default-features=false, features=["std", "alloc", "clock"] }
12+
chrono = { version="0.4.38", default-features=false, features=["std", "alloc", "clock"] }
1313
nom = "7.1.3"

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ pub fn parse_datetime_at_date<S: AsRef<str> + Clone>(
199199

200200
// Parse epoch seconds
201201
if let Ok(timestamp) = parse_timestamp(s.as_ref()) {
202-
if let Some(timestamp_date) = NaiveDateTime::from_timestamp_opt(timestamp, 0) {
203-
return Ok(date.offset().from_utc_datetime(&timestamp_date));
202+
if let Some(timestamp_date) = DateTime::from_timestamp(timestamp, 0) {
203+
return Ok(timestamp_date.into());
204204
}
205205
}
206206

0 commit comments

Comments
 (0)