<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thank you.<br class="">Time to upgrade Erlang at home (where I was looking in calendar without finding anything).<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 7 Apr 2020, at 00:02, Rickard Green <<a href="mailto:rickard@erlang.org" class="">rickard@erlang.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 6, 2020 at 10:34 PM bengt <<a href="mailto:cean.ebengt@gmail.com" class="">cean.ebengt@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">Greetings,<br class=""><br class="">How do I get from<br class=""><div style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">1> erlang:system_info(start_time).</span></div><div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font style="font-size:10px" face="Monaco" class="">-576460752000000000</font><br class=""><br class="">to some thing like {{2020,4,6},{22,27,0}} ?<br class=""><br class=""><br class=""></span></div></div></blockquote><div class=""><br class="">For example:<br class=""> calendar:system_time_to_local_time(erlang:system_info(start_time) + erlang:time_offset(), native).<br class=""><br class=""></div><div class="">There is also some other system_time_to_* functions in calendar. Note that if you are using single or multi time warp mode <<a href="https://erlang.org/doc/apps/erts/time_correction.html#Time_Warp_Modes" class="">https://erlang.org/doc/apps/erts/time_correction.html#Time_Warp_Modes</a>> the time offset may have changed since you started the VM. That is, depending on use case you may want to save the time offset when starting the system.<br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Different question:<br class="">Is it possible to find out when a gen_server was started? Or how long it has been running? Without letting init/1 save it in state.<br class="">It would help me finding out if a gen_server was started by its supervisor about the time when the data transfer suddenly dipped.<br class=""><br class=""><br class=""></span></div></div></blockquote><div class=""><br class=""></div><div class="">No, you need to save this time yourself if needed.<br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div style="margin:0px;font-stretch:normal;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Best Wishes,<br class="">bengt</span></div></div></blockquote></div><br clear="all" class=""></div><div class="">Regards,<br class=""></div><div class="">Rickard<br class=""></div><div dir="ltr" class="">-- <br class=""><div dir="ltr" class="gmail_signature">Rickard Green, Erlang/OTP, Ericsson AB</div></div></div></div>
</div></blockquote></div><br class=""></body></html>