Skip to content

Add jiff as a backend for Timestamp #3484

@inklesspen

Description

@inklesspen

The chrono maintainer has soft-deprecated chrono in favor of jiff.

It seems like it would be pretty straightforward to add jiff::Timestamp as an underlying type for serenity::…::Timestamp.

The only thing that might require discussion is what to do about the feature flags. I can see two possible approaches:

  1. add a jiff feature flag, and use #[cfg(not(any(feature = "chrono", feature = "jiff"))] for the time backend.
  2. add both jiff and time feature flags; since chrono is one of the default features anyway, this shouldn't be a huge hassle for users.

Although jiff isn't yet included in typesize, so maybe that would be an issue? I don't really understand what that is used for yet. But it should be pretty simple to add it if needed. I'll check with @GnomedDev on that.

I'd be happy to send a PR for this, if it'd be welcomed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions