Date

From Notes_Wiki
Revision as of 11:50, 5 March 2016 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>System_administration_tools|System Administration Tools</yambe:breadcrumb> =date= ==Convert date from human readable format to seconds since epoch (1 Jan 19...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>System_administration_tools|System Administration Tools</yambe:breadcrumb>

date

Convert date from human readable format to seconds since epoch (1 Jan 1970)

To convert date from human readable format to seconds since epoch use command similar to:

date -d "2015-12-12 13:41:59" +%s

Example output would be:

1449907919

Convert date from seconds since 1970 to human readable format

To convert date from seconds since 1970 to human readable format use command similar to:

date -d@1449907919

Example output would be:

Sat Dec 12 13:41:59 IST 2015