[erlang-questions] Getting system start time in UTC?

Roger Lipscombe roger@REDACTED
Mon Oct 23 13:05:26 CEST 2017


I can get the node's uptime with erlang:statistics(wall_clock), which
is in milliseconds, and can easily be converted into days, hours, etc.
representing how long this node has been up.

Is there an easy way to get the start time of the node, represented as
a UTC date/time? I'd like to be able to print "Up since dd/MM/yyyy (D
days ...", etc.

Obviously, I *could* subtract the uptime from the current date/time,
but that seems more complicated than necessary, assuming the node has
(somewhere) the actual start time.

Thanks,
Roger.



More information about the erlang-questions mailing list