<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Diptesh,<br>
<br>
Unfortunately the docs are a bit misleading - the supported format
for the $time() var is given by "man strftime" - and strftime has
no support for time units smaller than the second. This is why the
%N is not evaluated.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
<div class="moz-cite-prefix">On 10/31/2017 03:32 PM, Dipteshkumar
Patel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAD4_Da1uxO3nRcCdNHUPP79V1iFNO6r2eMhPr9fC-JkZZ8RVAA@mail.gmail.com">
<div dir="ltr">Hello sir,
<div><br>
</div>
<div>Thanks for your prompt reply</div>
<div><br>
</div>
<div>I used <b>$time(+%s%N)</b> but it uses only one format and
give the result "<b>+1509451841%N</b>" but i want to whole
time stamp.</div>
<div><br>
</div>
<div>This works fine from command line using <b>#time +%s%N.</b></div>
<div><b><br>
</b></div>
<div><b><br>
</b></div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr"><b>Diptesh Patel</b>
<div>Jr. Software Developer </div>
<div>Ecosmob Technologies Ltd</div>
<div>Ahmedabad</div>
<div>Mo:<b>+919898962659</b></div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Tue, Oct 31, 2017 at 5:12 PM,
Bogdan-Andrei Iancu <span dir="ltr"><<a
href="mailto:bogdan@opensips.org" target="_blank"
moz-do-not-send="true">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Hi,<br>
<br>
Have you looked at the $time(format) script variable:<br>
<br>
<a class="m_1216156772636087379moz-txt-link-freetext"
href="http://www.opensips.org/Documentation/Script-CoreVar-2-3#toc87"
target="_blank" moz-do-not-send="true">http://www.opensips.org/<wbr>Documentation/Script-CoreVar-<wbr>2-3#toc87</a><br>
<br>
You can take the all the time fields at once, and use a
transformation to split them if you need the fields in
separate variables.<br>
<br>
Regards,<br>
</tt>
<pre class="m_1216156772636087379moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_1216156772636087379moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.<wbr>com</a>
</pre>
<div>
<div class="h5">
<div class="m_1216156772636087379moz-cite-prefix">On
10/31/2017 10:36 AM, Dipteshkumar Patel wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Dear sir,
<div><br>
</div>
<div>I am using Opensips version 2.3.1</div>
<div><br>
</div>
<div>I am using $Ts and $Tsm for time stamp for
CDR but the microsecond time stamp is not same
as system time stamp. To resolve the issue i am
using exec() to get the system time but i takes
so much time (nearly 5ms ) whenever so many
calls concurrently running on server(We need
exact time because it will affect the call
duration).</div>
<div> </div>
<div>Can you please suggest me solution for the
issue ?</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>
<div>
<div
class="m_1216156772636087379gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr"><b>Diptesh Patel</b>
<div>Jr. Software Developer </div>
<div>Ecosmob Technologies Ltd</div>
<div>Ahmedabad</div>
<div>Mo:<b>+919898962659</b></div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset
class="m_1216156772636087379mimeAttachmentHeader"></fieldset>
<br>
</div>
</div>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_1216156772636087379moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_1216156772636087379moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>