Difference between revisions of "Date"
From Notes_Wiki
m |
m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[System administration tools]] > [[Date|date]] | |||
''''Newer article on this is at [[Convert date to different format using date command]]''' | |||
==Convert date from human readable format to seconds since epoch (1 Jan 1970)== | ==Convert date from human readable format to seconds since epoch (1 Jan 1970)== | ||
Line 29: | Line 31: | ||
==Convert date from other timezone to system time zone== | ==Convert date from other timezone to system time zone== | ||
To convert date | To convert date between timezones refer [[Converting timezone using date command]] | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[System administration tools]] > [[Date|date]] |
Latest revision as of 07:54, 15 October 2022
Home > CentOS > CentOS 6.x > System administration tools > date
'Newer article on this is at Convert date to different format using date command
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
Convert date from other timezone to system time zone
To convert date between timezones refer Converting timezone using date command
Home > CentOS > CentOS 6.x > System administration tools > date