[asterisk-users] Decimal seconds?

Antony Stone Antony.Stone at asterisk.open.source.it
Wed Mar 16 08:01:15 CDT 2022


On Wednesday 16 March 2022 at 13:38:44, Tom Ray wrote:

> What have you actually tried? STRFTIME(NOW,America/Detroit,%3q) doesn't
> work?

That works - thank you for the pointer.  I was not aware of the word "NOW" - I 
have always used the variable ${EPOCH} when I needed a timestamp.

Do you know where this is documented?  I would have expected it to be in 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables 
for example, which does mention ${EPOCH}, and also shows an example of 
${STRFTIME()}, using ${EPOCH} as the timestamp value.


Antony.

> -----Original Message-----
> From: asterisk-users <asterisk-users-bounces at lists.digium.com> On Behalf Of
> Antony Stone Sent: Wednesday, March 16, 2022 8:20 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users at lists.digium.com> Subject: Re: [asterisk-users] Decimal
> seconds?
> 
> Hi.
> 
> Has nobody got a clue for me about this?
> 
> It must be possible somehow, otherwise the %3q parameter wouldn't exist...
> 
> On Friday 11 March 2022 at 17:31:54, Antony Stone wrote:
> > Hi.
> > 
> > I'm looking at
> > https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_STRFTIME
> > and trying to work out how to obtain an Epoch timestamp for "now"
> > containing fractional / decimal seconds so that the %3q format parameter
> > works.
> > 
> > https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Vari
> > ab les doesn't seem to tell me.
> > 
> > Can someone point me in the right direction please?
> > 
> > 
> > Antony.

-- 
Programming is a Dark Art, and it will always be. The programmer is
fighting against the two most destructive forces in the universe:
entropy and human stupidity. They're not things you can always
overcome with a "methodology" or on a schedule.

 - Damian Conway, Perl God

                                                   Please reply to the list;
                                                         please *don't* CC me.



More information about the asterisk-users mailing list