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

ulidtime enhancements #7615

Merged
merged 4 commits into from
Mar 13, 2024
Merged

ulidtime enhancements #7615

merged 4 commits into from
Mar 13, 2024

Conversation

pstibrany
Copy link
Member

@pstibrany pstibrany commented Mar 13, 2024

What this PR does

ulidtime can now show random part of ULID, as well as timestamp in milliseconds. It now uses tabwriter for nicer formatting.

Example output:

ulidtime -header -entropy -millis 01H8G30YH46MCFWK10PMXJN2KW 01H8K2R3AZT7N9JSJFF2NDGEA9 01H8N8E7SCB3PBBD6PERMJ7PEJ 01H8QTZPEXGG8TEQFBKY0BPQMF 01H8TDCKH5WM2D56KSGNATE9RT 01H8X1ZFE5BED94C7JX88ZF9K4 01H8ZN7G70Z28DDCXTPF7H8DJ4 01H926WF74G7YFWZ1394S7616G 01H94S30Z0VZQP3GWQX2X2X524 01H97970YAQ4EKCZ6QS1QB4Q27 01H99YVZ0ACNDYXF6FMWM91V4S 01H9CFBYCS0XHYNW10X1HC8NSQ 01H9F454S0KD1VAYW53225D60D 01H9HKGZ8PDWSEJYMPRZBG65YN

ULID                        TIMESTAMP                 MILLISECONDS   RANDOM
01H8G30YH46MCFWK10PMXJN2KW  2023-08-23T02:19:22.532Z  1692757162532  3518fe4c20b53b2a8a7c
01H8K2R3AZT7N9JSJFF2NDGEA9  2023-08-24T06:12:15.839Z  1692857535839  d1ea99664f78aad83949
01H8N8E7SCB3PBBD6PERMJ7PEJ  2023-08-25T02:30:13.036Z  1692930613036  58ecb5b4d6762923d9d2
01H8QTZPEXGG8TEQFBKY0BPQMF  2023-08-26T02:32:48.349Z  1693017168349  8411a75deb9f80bb5e8f
01H8TDCKH5WM2D56KSGNATE9RT  2023-08-27T02:32:54.565Z  1693103574565  e504d29a798555a7271a
01H8X1ZFE5BED94C7JX88ZF9K4  2023-08-28T03:11:13.349Z  1693192273349  5b9a9230f2ea11f7a664
01H8ZN7G70Z28DDCXTPF7H8DJ4  2023-08-29T03:26:08.096Z  1693279568096  f890d6b3bab3cf143644
01H926WF74G7YFWZ1394S7616G  2023-08-30T03:13:09.86Z   1693365189860  81fcfe7c2349327304d0
01H94S30Z0VZQP3GWQX2X2X524  2023-08-31T03:09:47.872Z  1693451387872  dfef61c397e8ba2e9444
01H97970YAQ4EKCZ6QS1QB4Q27  2023-09-01T02:30:05.002Z  1693535405002  b91d367cd7c86eb25c47
01H99YVZ0ACNDYXF6FMWM91V4S  2023-09-02T03:27:00.106Z  1693625220106  655beebccfa72890ec99
01H9CFBYCS0XHYNW10X1HC8NSQ  2023-09-03T02:53:49.849Z  1693709629849  0763eaf020e862c45737
01H9F454S0KD1VAYW53225D60D  2023-09-04T03:35:35.968Z  1693798535968  9b43b57b85188456980d
01H9HKGZ8PDWSEJYMPRZBG65YN  2023-09-05T02:42:41.046Z  1693881761046  6f32e97a96c7d70317d5

Which issue(s) this PR fixes or relates to

Fixes #

Checklist

  • [na] Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

…tting.

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
@pstibrany pstibrany requested review from jdbaldry and a team as code owners March 13, 2024 09:22
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pstibrany pstibrany enabled auto-merge (squash) March 13, 2024 13:59
@pstibrany pstibrany merged commit ce9df83 into main Mar 13, 2024
29 checks passed
@pstibrany pstibrany deleted the ulidtime-enhancements branch March 13, 2024 14:15
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.

2 participants