<div>Awesome. Just tried and you are correct. Just went to </div>
<div><a href="http://www.manpagez.com/man/3/strftime/" target="_top" rel="nofollow">http://www.manpagez.com/man/3/strftime/</a></div>
<div>And I see the formats to use.</div>
<div> </div>
<div>Is it possible for you to update the Documentation on the CFGUTILS page? I totally would not have been able to figure out the format variables with the info given for time().</div>
<div> </div>
<div>Thanks for the help.<br><br></div>
<div class="gmail_quote">On Sat, Oct 24, 2009 at 11:57 AM, Bogdan-Andrei Iancu [via OpenSIPS (Open SIP Server)] <span dir="ltr"><<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3884810&i=0" target="_top" rel="nofollow">[hidden email]</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi, <br><br>you are misusing the variable. <br>According to the docs: <br> "new PV $time(format) to print time is dynamic formatted time <br>
string. Format: see "man strftime" ; Ex: $time(B %Y) -> Thursday <br>September 2009" <br><br>So, you should do $time(%Y) to get the current year. <br><br>Regards, <br>Bogdan <br><br>osiris123d wrote:
<div><br>> This is my first time trying to use the $test function. When I read the <br>> documentation on it I am expecting the function to return the current unit <br>> of time that I put in the parentheses. Yet in my config I have the <br>
> following command just so I can test it <br>> <br>> xlog("L_INFO", "$time(year)/$time(mon)/$time(mday) <br>> $time(hour):$time(min):$time(sec).$time(msec)"); <br>> The output for this is the following <br>
> year/mon/mday hour:min:sec.msec <br>> <br>> That doesn't seem right. <br>> <br>> Also when I try the documents example <br>> <br>> if ($time(year) == "2009") { <br>> xlog("request: $rm from $fu to $ru in year 2009\n"); <br>
> } <br>> <br>> The condition is never true because $time(year) really equals "year" <br>> </div><br><br>_______________________________________________ <br>Users mailing list <br><a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3884567&i=0" rel="nofollow" target="_blank">[hidden email]</a> <br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="nofollow" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></blockquote></div><br><br clear="all"><br>-- <br>--<br>*--*--*--*--*--*<br>Duane<br>*--*--*--*--*--*<br>--<br>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/BUG-CFGUTILS-time-PV-doesn-t-work-Opensips-1-6-tp3881409p3884810.html">Re: [OpenSIPS-Users] ?BUG? - CFGUTILS $time() PV doesn't work Opensips 1.6</a><br>
Sent from the <a href="http://n2.nabble.com/OpenSIPS-Users-f1449235.html">OpenSIPS - Users mailing list archive</a> at Nabble.com.<br>