Hi all,

I've just been playing with the STRFTIME dialplan function and am having 
trouble getting it to pickup my systems local timezone.

According to show function STRFTIME and voip-info.org all the arguments are 
optional and according to voip-info.org if you leave them out they will 
default to the current time, the current timezone and %c respectively.

My local timezone is Pacific/Auckland (GMT+12) which is setup correctly 
AFAIK - date returns the correct time and timezone. I have also tried setting 
TZ=Pacific/Auckland and running asterisk at that console which didn't alter 
the behaviour.

If I call a test extension with this in the dialplan;

NoOp(${STRFTIME(,,)}))
NoOp(${STRFTIME(,Pacific/Auckland,)}))

then I get this output (shortened) ;

NoOp("SIP/800-081778a4", "Tue Aug 15 22:11:36 2006)")
NoOp("SIP/800-081778a4", "Wed Aug 16 10:11:36 2006)")

I have also tried reading asterisk/stdtime/localtime.c which is (I think) 
where this stuff goes on but it's over my head.

Does anyone have any ideas as to why I can't get this to work or am I 
expecting the wrong behaviour (using SVN trunk)?

Cheers,

hads

-- 
http://nicegear.co.nz
New Zealand's VoIP supplier
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to