{"id":38932193,"url":"https://github.com/borhansaflo/epoch-time","last_synced_at":"2026-01-19T18:11:34.402Z","repository":{"id":332237552,"uuid":"1133146126","full_name":"BorhanSaflo/epoch-time","owner":"BorhanSaflo","description":"A CLI tool to print and manipulate Unix epoch timestamps","archived":false,"fork":false,"pushed_at":"2026-01-13T14:42:23.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-18T00:23:36.439Z","etag":null,"topics":["cli","epoch-time","rust","terminal","tool"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BorhanSaflo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-13T00:19:21.000Z","updated_at":"2026-01-13T14:47:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"80d885fd-73b8-4ee8-b677-51f30b2e1c8d","html_url":"https://github.com/BorhanSaflo/epoch-time","commit_stats":null,"previous_names":["borhansaflo/epoch-time"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BorhanSaflo/epoch-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorhanSaflo%2Fepoch-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorhanSaflo%2Fepoch-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorhanSaflo%2Fepoch-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorhanSaflo%2Fepoch-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BorhanSaflo","download_url":"https://codeload.github.com/BorhanSaflo/epoch-time/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorhanSaflo%2Fepoch-time/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28543495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","epoch-time","rust","terminal","tool"],"created_at":"2026-01-17T15:43:50.600Z","updated_at":"2026-01-18T17:00:46.821Z","avatar_url":"https://github.com/BorhanSaflo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# epoch-time (et)\n\nepoch-time is a CLI tool that prints and manipulates Unix epoch timestamps. All operations use UTC. Timestamps are integers representing seconds since 1970-01-01T00:00:00Z.\n\nWith no arguments, print the current epoch. With a duration argument,\napply the offset to the current epoch. With an epoch and duration,\napply the offset to the given epoch.\n\nWhen standard input is not a terminal, read epoch timestamps from\nstdin (one per line) and apply any duration offset to each.\n\n## Installation\n\n### Using Cargo\n\n```bash\ncargo install epoch-time\n```\n\n### Using Installers\n\nDownload pre-built binaries from the [GitHub Releases](https://github.com/BorhanSaflo/epoch-time/releases) page.\n\n### Using brew\n\n```bash\nbrew tap BorhanSaflo/epoch-time\nbrew install et\n```\n\n### Using Nix\n\nRun directly without installing:\n\n```bash\nnix run github:BorhanSaflo/epoch-time\n```\n\nInstall to your profile:\n\n```bash\nnix profile install github:BorhanSaflo/epoch-time\n```\n\nOr add to your Nix configuration:\n\n```nix\n{\n  inputs.epoch-time.url = \"github:BorhanSaflo/epoch-time\";\n}\n```\n\nThen add `inputs.epoch-time.packages.${system}.default` to your packages.\n\n### Build from source\n\nClone the repository and build with Cargo:\n\n```bash\ngit clone https://github.com/BorhanSaflo/epoch-time.git\ncd epoch-time\ncargo build --release\n# The binary will be available at target/release/et\n```\n\n## Motivation\n\nI needed a simple tool to quickly generate epoch timestamps for URL queries. The date command can do this, but its syntax varies across implementations (GNU coreutils on Linux, BSD on macOS, and others), making it inconvenient for quick, portable use. This tool provides a fast and consistent way to generate epoch timestamps. Here's an example of how it can be used:\n\n```\ncurl \"https://api.example.com/data?start=$(et now)\u0026end=$(et now +7d)\"\n```\n\n## Usage\n\n- `et now [OFFSET]`         Print current epoch timestamp, optionally applying an offset\n- `et \u003cEPOCH\u003e [OFFSET]`     Print an epoch timestamp with an optional offset\n- `et parse \u003cTIMESTAMP\u003e`    Convert ISO-8601 timestamp (UTC required) to epoch\n- `et format \u003cEPOCH\u003e`      Convert epoch to ISO-8601 UTC\n\n\n## Duration Units\n\n| Unit | Value            |\n|------|------------------|\n| s    | 1 second         |\n| m    | 60 seconds       |\n| h    | 3600 seconds     |\n| d    | 86400 seconds    |\n| w    | 604800 seconds   |\n| M    | 1 month          |\n| Y    | 1 year           |\n\nMonths and years use calendar arithmetic. Days are clamped to valid\nrange for the target month (e.g., Jan 31 + 1M = Feb 28).\n\n## Examples\n\nPrint current epoch:\n\n    et\n\nSubtract 7 days:\n\n    et -7d\n\nAdd 3 hours:\n\n    et +3h\n\nAdd 1 month:\n\n    et +1M\n\nSubtract 1 year:\n\n    et -1Y\n\nAdd 1 hour to a specific epoch:\n\n    et 1704912345 +1h\n\nConvert ISO-8601 to epoch:\n\n    et parse 2026-01-05T12:00:00Z\n\nConvert epoch to ISO-8601:\n\n    et format 1704912345\n\nApply offset to timestamps from stdin:\n\n    cat timestamps.txt | et -1d\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborhansaflo%2Fepoch-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborhansaflo%2Fepoch-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborhansaflo%2Fepoch-time/lists"}