Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ksuid): add function for extracting timestamp #35

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

t3hmrman
Copy link
Member

@t3hmrman t3hmrman commented Dec 6, 2023

KSUID is a format that contains a timestamp, and while it has been possible to create a KSUID value with a new timestamp there was not a function for extracting the existing timestamp from a generated value.

This commit adds the function idkit_ksuid_extract_timestamptz which extracts a timestamptz from a textual ksuid value.

Note that this PR is a partial implementation of #7

@t3hmrman t3hmrman force-pushed the feat/ksuid/extract-timestamps branch 2 times, most recently from fcebe06 to 6987c72 Compare December 6, 2023 21:02
KSUID is a format that contains a timestamp, and while it has been
possible to create a KSUID value with a new timestamp there was not a
function for extracting the existing timestamp from a generated value.

This commit adds the function `idkit_ksuid_extract_timestamptz` which
extracts a timestamptz from a textual ksuid value.

This commit *also* changes the implementation of ksuid from the much
older `ksuid` crate to the newer and more ergonomic `svix-ksuid`.

Signed-off-by: vados <[email protected]>
@t3hmrman t3hmrman force-pushed the feat/ksuid/extract-timestamps branch from 3d2de3e to 141fb9b Compare December 6, 2023 21:14
@t3hmrman t3hmrman marked this pull request as ready for review December 6, 2023 21:14
@t3hmrman t3hmrman merged commit bf886a1 into main Dec 6, 2023
1 check passed
@t3hmrman t3hmrman deleted the feat/ksuid/extract-timestamps branch December 6, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant