[Home]

Summary:ASTERISK-08295: STRFTIME() requires an argument, but function description does not reflect that
Reporter:Serge Vecher (serge-v)Labels:
Date Opened:2006-12-07 14:06:17.000-0600Date Closed:2006-12-10 23:41:11.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Functions/func_strings
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:description for function STRFTIME() makes one believe that it requires no arguments, whereas that is not the case. I propose that either the description is fixed indicating which argument is required, or code gets adjusted to match the advertised description.

Also, perhaps some examples of use could be added to description, i.e.
${STRFTIME(,EST,%Y%m%d-%H%M%S)} is same as ${TIMESTAMP}

Comments:By: Tilghman Lesher (tilghman) 2006-12-07 16:26:57.000-0600

Could've fooled me:

vcch17*CLI> show dialplan 135@internal
[ Context 'internal' created by 'pbx_config' ]
 '135' =>          1. NoOp(${STRFTIME()})                        [pbx_config]

   -- Executing NoOp("SIP/103-081ff2d8", "Thu Dec  7 16:25:34 2006") in new stack
   -- Executing Hangup("SIP/103-081ff2d8", "") in new stack
 == Spawn extension (internal, 135, 2) exited non-zero on 'SIP/103-081ff2d8'


By: Serge Vecher (serge-v) 2006-12-08 08:21:40.000-0600

Just tried again, same thing. I thing this code kicks in:

       if (ast_strlen_zero(parse)) {
               ast_log(LOG_ERROR,
                               "Asterisk function STRFTIME() requires an argument.\n");
               return -1;
       }

I will remove the block and recompile later -- this is a production server.

By: Tilghman Lesher (tilghman) 2006-12-10 23:41:11.000-0600

Fixed in 48382.