Thursday, July 3, 2014

How to get UNIX TIMESTAMP in ERLANG

If you want to get UNIX TIMESTAMP which means number of seconds starting from Thursday, 1 January 1970, You can use following command.

calendar:datetime_to_gregorian_seconds
(calendar:now_to_universal_time( now()))-719528*24*3600.

Labels: