STRPTIME only returning 0

I have been playing with STRPTIME to get unixtime of a readable time and I only getting 0 or an error.

exten => _+1NXXNXXXXXX,n,Set(startTime=${STRPTIME(2006-03-01 07:30:35,America/Chicago,%Y-%m-%d %H:%M:%S)})
The above is the example from the docs

the following is the result
Executing [+13XNXXXXXX@inbound:8] Set("PJSIP/carrier-00000040", "startTime=0") in new stack


I am experiencing the same problem. While trying to debug asterisk, I noticed that disabling optimization corrects this problems. Seems some issue between gcc and the asterisk source code with optimizations.

1 Like