V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
JayLiu

刚写的时间戳 timestamp 转换工具,分享一下

  •  
  •   JayLiu · Jun 25, 2019 · 1375 views
    This topic created in 2498 days ago, the information mentioned may be changed or developed.

    mac 上直接安装

    $: brew tap liujianping/tap && brew install ts
    

    操作很简单,贴个帮助

    $: 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
    
    1 replies    2021-04-23 17:33:28 +08:00
    balabalaguguji
        1
    balabalaguguji  
       Apr 23, 2021
    直接有网页版本,这个很好用呀 https://tools.fun/timestamp.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5575 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 07:05 · PVG 15:05 · LAX 00:05 · JFK 03:05
    ♥ Do have faith in what you're doing.