Helper methods for time calucate.
get unix timestamp
tranfrom the erl datetime tuple to unix timestamp