depoch

command module
v0.0.0-...-b3d7d97 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 8 Imported by: 0

README

depoch

Convert an epoch timestamp to a human readable (RFC3339) timestamp.

Install

 go install github.com/dhulihan/depoch@latest

Use

$ depoch 1696617071
2023-10-06T12:31:11-06:00

# from STDIN
$ echo "1696617071" | depoch
2023-10-06T12:31:11-06:00

# reverse convert a time string to an epoch
# WARNING: time zone may not be maintained, depending on format.
$ echo "Mon Jan 02 15:04:05 -0700 2006" | depoch
1136239445

FAQ

  • Why not just use date? Because it does not support STDIN, and the CLI flags differ between BSD/GNU.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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