Reading calendar module documentation I see the note:<br>"For computing differences between epochs in time, use
the functions counting gregorian days or seconds. If epochs are
given as local time, they must be converted to universal time, in
order to get the correct value of the elapsed time between epochs.
Use of the function <span class="code">time_difference/2</span> is discouraged."<br>But it's not quite clear to me...<br>E.g. I have 2 values LocalTime1 and LocalTime2 which are somewhat like tuples erlang:localtime/0 and need to compute time difference e.g. in seconds. So should I then convert this values to UTC and then use calendar:<a name="datetime_to_gregorian_seconds-2"><span class="bold_code">datetime_to_gregorian_seconds/1 and then do the subtraction? <br>
Or maybe there is some easier way?<br><br>Best regards,<br>Kirill.<br><br><br></span></a>