Script(s)

technology as-is

August 17, 2015
by gchandra
0 comments

Linux Tip : Convert date time to Unix Time (Epoch)

Simple script to covert  regular  date time to unix epoch time format  (UTC) $dat=’01/02/2015′ #If date is passed without time then its assumed as midnight  00:00:00 for that day. $sepoch=$(date “+%s” -d “$dat”) $echo $sepoch will return 1420156800 #If you … Continue reading