[GH-ISSUE #2346] Add a feature option to use chrono instead of time? #966

Closed
opened 2026-03-16 01:06:54 +03:00 by kerem · 4 comments
Owner

Originally created by @zh-jq-b on GitHub (Aug 7, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2346

The 0.25 version introduces time as a dependency, how about switch to chrono or add a feature to switch?

Originally created by @zh-jq-b on GitHub (Aug 7, 2024). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2346 The 0.25 version introduces `time` as a dependency, how about switch to `chrono` or add a feature to switch?
kerem closed this issue 2026-03-16 01:07:19 +03:00
Author
Owner

@djc commented on GitHub (Aug 7, 2024):

This was added in the proto crate in https://github.com/hickory-dns/hickory-dns/pull/2335/commits/64e35689ad556d387d09d811b5586d0ac098099f (as part of #2335). Previously it was only used in the server crate and I pushed down the dependency in order to expose a more type-safe interface for the newer higher-level TBS constructor (rather than passing around u32 with an implicit well-defined scope).

Historically, we moved from chrono to time in #1569 -- however, since then chrono got a new maintainer (me) and fixed all the advisory issues. At this point, chrono and time are nearly equally popular.

I don't really love the option of allowing both. We could switch back to chrono but it doesn't seem meaningfully better?

@zh-jq-b what are your constraints here? Do you actually need DNSSEC? Are you depending on the proto crate directly or via the resolver?

<!-- gh-comment-id:2273502040 --> @djc commented on GitHub (Aug 7, 2024): This was added in the proto crate in https://github.com/hickory-dns/hickory-dns/pull/2335/commits/64e35689ad556d387d09d811b5586d0ac098099f (as part of #2335). Previously it was only used in the server crate and I pushed down the dependency in order to expose a more type-safe interface for the newer higher-level `TBS` constructor (rather than passing around `u32` with an implicit well-defined scope). Historically, we moved from chrono to time in #1569 -- however, since then chrono got a new maintainer (me) and fixed all the advisory issues. At this point, chrono and time are nearly equally popular. I don't really love the option of allowing both. We could switch back to chrono but it doesn't seem meaningfully better? @zh-jq-b what are your constraints here? Do you actually need DNSSEC? Are you depending on the proto crate directly or via the resolver?
Author
Owner

@zh-jq-b commented on GitHub (Aug 8, 2024):

@zh-jq-b what are your constraints here? Do you actually need DNSSEC? Are you depending on the proto crate directly or via the resolver?

I didn't have time in the dependency and it also depends on some others crates, it will be good to avoid those new deps.
I use the client and the proto crate directly without DNSSEC features enabled.

<!-- gh-comment-id:2274870186 --> @zh-jq-b commented on GitHub (Aug 8, 2024): > @zh-jq-b what are your constraints here? Do you actually need DNSSEC? Are you depending on the proto crate directly or via the resolver? I didn't have `time` in the dependency and it also depends on some others crates, it will be good to avoid those new deps. I use the `client` and the `proto` crate directly without DNSSEC features enabled.
Author
Owner

@djc commented on GitHub (Aug 8, 2024):

#2349 at least gets rid of the extra dependency for your particular use case, making it conditional on dnssec being in use.

<!-- gh-comment-id:2275059761 --> @djc commented on GitHub (Aug 8, 2024): #2349 at least gets rid of the extra dependency for your particular use case, making it conditional on `dnssec` being in use.
Author
Owner

@zh-jq-b commented on GitHub (Aug 8, 2024):

thanks, #2349 this will work for me

<!-- gh-comment-id:2275068930 --> @zh-jq-b commented on GitHub (Aug 8, 2024): thanks, #2349 this will work for me
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#966
No description provided.