epochutil

command
v0.0.0-...-63f5abb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

README

epochutil

Binary epochutil formats and parses dates. This is a command line interface tool for the Go time package.

Install

go get -v github.com/vegacom/go/epochutil

Use cases

Print the time now in the default timezone:

epochutil now

Print the time now in Mexico City:

epochutil --zone mexico_city now

Print the time four hours ago:

epochutil --delta -4h now

Parse the epoch time in nanoseconds, print the time:

epochutil 1388586612345678901

Parse the epoch time in seconds, and print the time:

epochutil 1388586612

Parse the date and print the time:

epochutil "2014-01-01"

Parse the date and print the time one day after in Mexico City:

epochutil --delta 24h --zone mexico_city "2014-01-01 09:30:10.267 +0900 JST"

Documentation

Overview

Binary epochutil formats and parses dates. This is a command line interface tool for

the Go time package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL