剛寫的時間戳 timestamp 轉換工具,分享一下

項目地址: tsgit

mac 上直接安裝github

$: brew tap liujianping/tap && brew install ts
複製代碼

操做很簡單,貼個幫助bash

$: ts -h
timestamp convert & compare tool

Usage:
  ts [flags]

Examples:

	(timestamp)	$: ts
	(format)	$: ts -f "2019/06/25 23:30:10"
	(before)	$: ts -b "2019/06/25 23:30:10" ; echo $?
	(after)		$: ts -a "2019/06/25 23:30:10" ; echo $?
	(timezone)	$: ts -f "2019/06/25 23:30:10" -z "Asia/Shanghai"


Flags:
  -a, --after string      after compare
  -b, --before string     before compare
  -f, --format string     time format
  -h, --help              help for ts
  -z, --timezone string   time zone
複製代碼
相關文章
相關標籤/搜索