Skip to content

Convert an epoch timestamp to a human readable timestamp.

License

Notifications You must be signed in to change notification settings

dhulihan/depoch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Convert an epoch timestamp to a human readable timestamp.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages