Trying to use the System() diaplan function

Hi,
I am trying to use the System() command in order to get the number of seconds since 1970, by using the System(date’+%s’) command.

I am running Asterisk.1.2.30.2, but I cannot see anything relating to this command. Can anyone offer an explanation please? Various sites, and the O’Reilly/TFOT book also has a section about it.

Rob.

Hi

why are you not using ${EPOCH} ? it does what you want and keeps it in the dialplan

Ian

Sorry?

${EPOCH} would be a chan variable that would give you the time. Try the following to get the idea

editing “_X.” and “1”. For whatever you need.

Hi,
That’s perfect. This is one of those hard to find tricks. I did a Google for it and it’s hardly mentioned elsewhere.

Thanks a lot, got me out of a hole this one.

Rob.