[OpenSIPS-Users] ?BUG? - CFGUTILS $time() PV doesn't work Opensips 1.6
osiris123d
duane.larson at gmail.com
Sat Oct 24 20:06:57 CEST 2009
Awesome. Just tried and you are correct. Just went to
http://www.manpagez.com/man/3/strftime/
And I see the formats to use.
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().
Thanks for the help.
On Sat, Oct 24, 2009 at 11:57 AM, Bogdan-Andrei Iancu [via OpenSIPS (Open
SIP Server)] <ml-node+3884567-1350505738 at n2.nabble.com<ml-node%2B3884567-1350505738 at n2.nabble.com>
> wrote:
> Hi,
>
> you are misusing the variable.
> According to the docs:
> "new PV $time(format) to print time is dynamic formatted time
> string. Format: see "man strftime" ; Ex: $time(B %Y) -> Thursday
> September 2009"
>
> So, you should do $time(%Y) to get the current year.
>
> Regards,
> Bogdan
>
> osiris123d wrote:
>
> > This is my first time trying to use the $test function. When I read the
> > documentation on it I am expecting the function to return the current
> unit
> > of time that I put in the parentheses. Yet in my config I have the
> > following command just so I can test it
> >
> > xlog("L_INFO", "$time(year)/$time(mon)/$time(mday)
> > $time(hour):$time(min):$time(sec).$time(msec)");
> > The output for this is the following
> > year/mon/mday hour:min:sec.msec
> >
> > That doesn't seem right.
> >
> > Also when I try the documents example
> >
> > if ($time(year) == "2009") {
> > xlog("request: $rm from $fu to $ru in year 2009\n");
> > }
> >
> > The condition is never true because $time(year) really equals "year"
> >
>
>
> _______________________________________________
> Users mailing list
> [hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3884567&i=0>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------
> View message @
> http://n2.nabble.com/BUG-CFGUTILS-time-PV-doesn-t-work-Opensips-1-6-tp3881409p3884567.html
> To unsubscribe from ?BUG? - CFGUTILS $time() PV doesn't work Opensips 1.6, click
> here< (link removed) =>.
>
>
>
--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
--
View this message in context: http://n2.nabble.com/BUG-CFGUTILS-time-PV-doesn-t-work-Opensips-1-6-tp3881409p3884810.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091024/52130b80/attachment-0001.htm
More information about the Users
mailing list