{"id":20510318,"url":"https://github.com/frobware/haproxytime","last_synced_at":"2025-06-25T02:37:37.406Z","repository":{"id":168946361,"uuid":"644758085","full_name":"frobware/haproxytime","owner":"frobware","description":"Parse time durations with support for days","archived":false,"fork":false,"pushed_at":"2024-04-04T11:22:25.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T19:37:00.031Z","etag":null,"topics":["duration-parsing","go","haproxy","time"],"latest_commit_sha":null,"homepage":"","language":"Go","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/frobware.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}},"created_at":"2023-05-24T07:40:22.000Z","updated_at":"2023-08-21T18:34:10.000Z","dependencies_parsed_at":"2023-10-10T23:03:11.857Z","dependency_job_id":"b535e8a8-3d40-4498-b5ae-ba1515162f3d","html_url":"https://github.com/frobware/haproxytime","commit_stats":null,"previous_names":["frobware/haproxytime"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/frobware/haproxytime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxytime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxytime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxytime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxytime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frobware","download_url":"https://codeload.github.com/frobware/haproxytime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxytime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261792263,"owners_count":23210285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["duration-parsing","go","haproxy","time"],"created_at":"2024-11-15T20:29:02.245Z","updated_at":"2025-06-25T02:37:37.380Z","avatar_url":"https://github.com/frobware.png","language":"Go","readme":"# haproxytime\n\n`haproxytime` is a command-line utility designed to facilitate the\nconversion of human-readable time durations into a format precisely\nrepresented in milliseconds, tailored specifically for HAProxy\nconfigurations.\n\nThis tool is useful for developers and administrators who work with\nHAProxy, providing a straightforward mechanism to ensure that timeout\nconfigurations are accurately specified in a format that HAProxy can\nunderstand. Whether you're inputting durations directly or piping them\nfrom standard input, `haproxytime` streamlines the process of dealing\nwith time durations, supporting a wide range of units from days to\nmicroseconds. With features to display durations in both machine- and\nhuman-readable formats, as well as the ability to print the maximum\nHAProxy timeout value, `haproxytime` minimises the risk of\nconfiguration errors in your HAProxy setup.\n\n## Install\n\nTo install without versioning information:\n\n```sh\n$ go install github.com/frobware/haproxytime@latest\n```\n\nTo install with versioning information:\n\n```sh\n$ go install -ldflags \"-X 'main.buildVersion=$(git describe --tags --abbrev=8 --dirty --always --long)'\" github.com/frobware/haproxytime@latest\n```\n\n## Usage\n\n```console\nhaproxytime - Convert human-readable time duration to millisecond format\n\nGeneral Usage:\n  haproxytime [-help] [-v]\n  haproxytime [-h] [-m] [\u003cduration\u003e]\n\nUsage:\n  -help Show usage information\n  -v\tShow version information\n  -h\tPrint duration value in a human-readable format\n  -m\tPrint the maximum HAProxy timeout value\n  \u003cduration\u003e: value to convert. If omitted, will read from stdin.\n\nThe flags [-help] and [-v] are mutually exclusive with any other\noptions or duration input.\n\nAvailable units for time durations:\n  d   days\n  h:  hours\n  m:  minutes\n  s:  seconds\n  ms: milliseconds\n  us: microseconds\n\nA duration value without a unit defaults to milliseconds.\n\nExamples:\n  haproxytime -m           -\u003e Print the maximum HAProxy duration.\n  haproxytime 2h30m5s      -\u003e Convert duration to milliseconds.\n  haproxytime -h 4500000   -\u003e Convert 4500000ms to a human-readable format.\n  echo 150s | haproxytime  -\u003e Convert 150 seconds to milliseconds.\n```\n\n## Build\n\n```sh\n$ make\n$ make install\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrobware%2Fhaproxytime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrobware%2Fhaproxytime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrobware%2Fhaproxytime/lists"}