{"id":13410679,"url":"https://github.com/liujianping/ts","last_synced_at":"2026-03-09T20:33:02.132Z","repository":{"id":57496782,"uuid":"193685670","full_name":"liujianping/ts","owner":"liujianping","description":"timestamp convert \u0026 compare tool. 时间戳转换与对比工具","archived":false,"fork":false,"pushed_at":"2019-07-02T02:41:06.000Z","size":1651,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-31T20:43:38.669Z","etag":null,"topics":["command-line-tool","compare","convert","format","timestamp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liujianping.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}},"created_at":"2019-06-25T10:21:13.000Z","updated_at":"2023-11-14T12:53:40.000Z","dependencies_parsed_at":"2022-08-28T19:40:53.500Z","dependency_job_id":null,"html_url":"https://github.com/liujianping/ts","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/liujianping/ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liujianping%2Fts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liujianping%2Fts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liujianping%2Fts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liujianping%2Fts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liujianping","download_url":"https://codeload.github.com/liujianping/ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liujianping%2Fts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30310787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["command-line-tool","compare","convert","format","timestamp"],"created_at":"2024-07-30T20:01:08.354Z","updated_at":"2026-03-09T20:33:02.106Z","avatar_url":"https://github.com/liujianping.png","language":"Go","readme":"ts\n===\ntimestamp convert \u0026 compare tool\n\n[![GoDoc](https://godoc.org/github.com/liujianping/ts?status.svg)](https://godoc.org/github.com/liujianping/ts) [![Go Report Card](https://goreportcard.com/badge/github.com/liujianping/ts)](https://goreportcard.com/report/github.com/liujianping/ts) [![Build Status](https://travis-ci.org/liujianping/ts.svg?branch=master)](https://travis-ci.org/liujianping/ts) [![Version](https://img.shields.io/github/tag/liujianping/ts.svg)](https://github.com/liujianping/ts/releases) [![Coverage Status](https://coveralls.io/repos/github/liujianping/ts/badge.svg?branch=master)](https://coveralls.io/github/liujianping/ts?branch=master)\n\n## Install\n\n### Shell Install support Linux \u0026 MacOS\n\n````bash\n# binary will be $(go env GOPATH)/bin/ts\n$: curl -sfL https://raw.githubusercontent.com/liujianping/ts/master/install.sh | sh -s -- -b $(go env GOPATH)/bin\n\n# In alpine linux (as it does not come with curl by default)\n$: wget -O - -q https://raw.githubusercontent.com/liujianping/ts/master/install.sh | sh -s \n\n```` \n\n### Brew Install only MacOS\n````bash\n$: brew tap liujianping/tap \u0026\u0026 brew install ts\n````\n\n### Source Install\n````bash\n$: git clone git@github.com:liujianping/ts.git\n$: cd ts\n$: go install -mod vendor\n````\n\n## Quick Start\n\n````bash\n$: ts -h\ntimestamp convert \u0026 compare tool\n\nUsage:\n  ts [flags]\n\nExamples:\n\n\t(now timestamp)\t$: ts\n\t(now add)\t\t$: ts --add 1d\n\t(now sub)\t\t$: ts --sub 1d\n\t(convert)\t\t$: ts \"2019/06/24 23:30:10\"\n\t(pipe)\t\t\t$: echo \"2019/06/24 23:30:10\" | ts\n\t(format)\t\t$: ts -f \"2019/06/25 23:30:10\"\n\t(before)\t\t$: ts -b \"2019/06/25 23:30:10\" ; echo $?\n\t(after)\t\t\t$: ts -a \"2019/06/25 23:30:10\" ; echo $?\n\t(timezone)\t\t$: ts -f \"2019/06/25 23:30:10\" -z \"Asia/Shanghai\"\n\t(Formats)\t\t$: ts -F \n\t\tANSIC       = \"Mon Jan _2 15:04:05 2006\"\n\t\tUnixDate    = \"Mon Jan _2 15:04:05 MST 2006\"\n\t\tRubyDate    = \"Mon Jan 02 15:04:05 -0700 2006\"\n\t\tRFC822      = \"02 Jan 06 15:04 MST\"\n\t\tRFC822Z     = \"02 Jan 06 15:04 -0700\" RFC822 with numeric zone\n\t\tRFC850      = \"Monday, 02-Jan-06 15:04:05 MST\"\n\t\tRFC1123     = \"Mon, 02 Jan 2006 15:04:05 MST\"\n\t\tRFC1123Z    = \"Mon, 02 Jan 2006 15:04:05 -0700\" RFC1123 with numeric zone\n\t\tRFC3339     = \"2006-01-02T15:04:05Z07:00\"\n\t\tRFC3339Nano = \"2006-01-02T15:04:05.999999999Z07:00\"\n\t\tKitchen     = \"3:04PM\"\n\t\tStamp      = \"Jan _2 15:04:05\"\n\t\tStampMilli = \"Jan _2 15:04:05.000\"\n\t\tStampMicro = \"Jan _2 15:04:05.000000\"\n\t\tStampNano  = \"Jan _2 15:04:05.000000000\"\n\t\tTimestampSec\t= \"time.Unix()\"\n\t\tTimestampMilli  = \"time.UnixNano()/1000000\"\n\t\tTimestampMicro  = \"time.UnixNano()/1000\"\n\t\tTimestampNano\t= \"time.UnixNano()\"\n\nFlags:\n      --add duration      add duration\n  -a, --after string      after compare\n  -b, --before string     before compare\n  -f, --format string     time format\n  -h, --help              help for ts\n      --sub duration      sub duration\n  -z, --timezone string   time zone\n````\n\nsupport system format:\n- ANSIC       = \"Mon Jan _2 15:04:05 2006\"\n- UnixDate    = \"Mon Jan _2 15:04:05 MST 2006\"\n- RubyDate    = \"Mon Jan 02 15:04:05 -0700 2006\"\n- RFC822      = \"02 Jan 06 15:04 MST\"\n- RFC822Z     = \"02 Jan 06 15:04 -0700\" - RFC822 with numeric zone\n- RFC850      = \"Monday, 02-Jan-06 15:04:05 MST\"\n- RFC1123     = \"Mon, 02 Jan 2006 15:04:05 MST\"\n- RFC1123Z    = \"Mon, 02 Jan 2006 15:04:05 -0700\" - RFC1123 with numeric zone\n- RFC3339     = \"2006-01-02T15:04:05Z07:00\"\n- RFC3339Nano = \"2006-01-02T15:04:05.999999999Z07:00\"\n- Kitchen     = \"3:04PM\"\n- Stamp      = \"Jan _2 15:04:05\"\n- StampMilli = \"Jan _2 15:04:05.000\"\n- StampMicro = \"Jan _2 15:04:05.000000\"\n- StampNano  = \"Jan _2 15:04:05.000000000\"","funding_links":[],"categories":["Command Line","命令行","命令行工具","Build Automation","命令行工具### 标准 CLI`用于创建一个标准命令行应用程序的库`"],"sub_categories":["Standard CLI","标准CLI","标准 CLI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliujianping%2Fts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliujianping%2Fts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliujianping%2Fts/lists"}