[erlang-questions] Getting system start time in UTC?
Mon Oct 23 14:15:34 CEST 2017
Maybe erlang:system_info(start_time) is what are you looking for.
Get Unix time at system start:
erlang:time_offset(), native, seconds).
On Mon, Oct 23, 2017 at 2:05 PM, Roger Lipscombe <>
> 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.
> erlang-questions mailing list
Danil Zagoskin |
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions