Crates.io | too-many-timestamps |
lib.rs | too-many-timestamps |
version | 0.1.0 |
source | src |
created_at | 2021-11-26 08:18:47.142154 |
updated_at | 2021-11-26 08:18:47.142154 |
description | Simple CLI tool to interpret and convert UNIX timestamps |
homepage | |
repository | |
max_upload_size | |
id | 487950 |
size | 65,949 |
Simple command line tool to interpret and convert UNIX timestamps
The actual command is called timestamps
.
When run with no arguments, it prints info for the current time
To decode a timestamp, simply provide is as argument
$ timestamps 1637906683
You can optionally decode other formats by providing the corresponding option
-S, --seconds Interpret input as seconds (the default)
-M, --milliseconds Interpret input as milliseconds
-U, --microseconds Interpret input as microseconds
-N, --nanoseconds Interpret input as nanoseconds
This tool also supports decoding Discord and Twitter IDs ("Snowflake" format) using these options
-D, --discord Interpret input as a Discord ID
-T, --twitter Interpret input as a Twitter Snowflake
The non-time info available in Snowflakes is specific to the platform that generated it.
To build this tool, you should not need anything more than an up to date Rust toolchain and running cargo build
in the repository.
I have no way to test this, but it seems that compatibility should be complete for all non-embedded platforms that rust supports.
To install, copy the binary wherever you want on the system, and optionally install the completions for your shell.
Copyright (C) 2021 0x5c
This program is released under the terms of the Québec Free and Open-Source Licence – Strong Reciprocity (LiLiQ-R+), version 1.1.
See LICENCE
for full license text (Français / English).