epoch

command
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Program epoch print the current time (Unix seconds, milliseconds, nanoseconds, local time, and UTC time) or the time based on the epoch on first parameter. Usage,

epoch <unix-seconds|unix-milliseconds|unix-nanoseconds>

Without a parameter, it will print the current time. With single parameter, it will print the time based on that epoch.

Example,

$ epoch

Unix seconds: 1639896843
  Unix milli: 1639896843382
  Unix micro: 1639896843382879
   Unix nano: 1639896843382879358
  Local time: 2021-12-19 13:54:03.382879358 +0700 WIB m=+0.000041439
    UTC time: 2021-12-19 06:54:03.382879358 +0000 UTC

$ epoch 1639800000

Unix seconds: 1639800000
  Unix milli: 1639800000000
  Unix micro: 1639800000000000
   Unix nano: 1639800000000000000
  Local time: 2021-12-18 11:00:00 +0700 WIB
    UTC time: 2021-12-18 04:00:00 +0000 UTC

Jump to

Keyboard shortcuts

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