刚写的时间戳 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
复制代码
相关文章
相关标签/搜索