_____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Warren Selby
Sent: Tuesday, July 13, 2010 1:40 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] STRFTIME function declared in globals context

 

On Tue, Jul 13, 2010 at 1:15 PM, Tilghman Lesher <[email protected]> wrote:

When you load the dialplan, do you see the global variables getting set?
That would at least tell you whether the problem lies at the point where the
values are loaded into memory, or later, at evaluation time.




  == Setting global variable 'YEAR' to 'Tue Jul 13 13:36:55 2010'
  == Setting global variable 'MONTH' to 'Tue Jul 13 13:36:55 2010'
  == Setting global variable 'DAY' to 'Tue Jul 13 13:36:55 2010'
  == Setting global variable 'TIMESTAMP' to 'Tue Jul 13 13:36:55 2010'

So apparently they're loaded into memory when the dialplan is reloaded?

-- 
Thanks,
--Warren Selby
http://www.selbytech.com

 

--

Since you never know when you'll need this, I slapped the code into my
1.4.30.  

Here is the "corrected" code that works

YEAR = ${STRFTIME(${EPOCH}||%Y)}

MONTH = ${STRFTIME(${EPOCH}||%m)}

DAY = ${STRFTIME(${EPOCH}||%d)}

TIMESTAMP = ${STRFTIME(${EPOCH}||%Y%m%d-%H%M%S)}

 

 

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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

Reply via email to