Project

tepoch

0.0
No commit activity in last 3 years
No release in over 3 years
Easy way to convert and interact with epoch timestamps in the terminal
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

Tepoch

A simple library for interacting with unix timestamps in the terminal

Installation

gem install tepoch

Usage

Convert to human readable format

tepoch 1363223109 => 2013-03-14 01:05:09 UTC
tepoch 1363223109000 => 2013-03-14 01:05:09 UTC

You can also pass in as many timestamps as you want and it'll convert all of them

tepoch 1394560406 1394560407 1394560408 1394560409 =>
2014-03-11 17:53:26 UTC
2014-03-11 17:53:27 UTC
2014-03-11 17:53:28 UTC
2014-03-11 17:53:29 UTC

Difference between two times:

tepoch 1363223109 - 1331687109 => 365 days, 0 hours, 0 minutes, 0 seconds

There's even a clock. It displays the timestamp | human date time | time since epoch in human readable format

tepoch clock

Flags

By default this will convert everything to utc. If you would like to keep it in local time you can pass --local

tepoch 1363223109 => 2013-03-14 01:05:09 UTC
tepoch 1363223109 --local => 2013-03-13 21:05:09 -0400

If you want the output to be in timestamp form you can pass the --timestamp flag

tepoch 1363223109 - 1331687109 => 365 days, 0 hours, 0 minutes, 0 seconds
tepoch 1363223109 - 1331687109 --timestamp => 31536000