12
date +%s
returns the current datetime in seconds since 1970-01-01 00:00:00 UTC
if you want to get a given datetime in seconds since 1970-01-01 00:00:00 UTC, for example:
kent$ date -d"2008-08-08 20:20:20" +%s
1218219620
to get diff in seconds, you just get the two dates in seconds, and do a s1-s2