Helper methods for time calucate.
Get unix timestamp
Transform the erl datetime tuple to unix timestamp