[Asterisk-Dev] app_datetime unused ? and sayunixtime cleanup...

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Nov 15 09:29:39 MST 2005


On Tuesday 15 November 2005 09:46, Kevin P. Fleming wrote:
> Luigi Rizzo wrote:
> > If this is the case, could we just cvs delete it ?
> > Should i open a bug in mantis ?
>
> Yes please.

The original reason for keeping it was that it was a relatively simple
application that could be used to help others learn how to write
apps.  However, there's no functional reason why it needs to stay.

> > Also (post 1.2) i notice that app_sayunixtime has hardwired
> > syntaxes for the various languages e.g. in sayunixtime_exec():
> >
> >         if( !strcasecmp(chan->language, "da" ) ) {
> >                 format = "A dBY HMS";
> >         } else if ( !strcasecmp(chan->language, "de" ) ) {
> >                 format = "A dBY HMS";
> >         } else {
> >                 format = "ABdY 'digits/at' IMp";
> >         }
> >
> > This seems wrong, because the language-specific rules to play dates
> > times etc are already in the "say" application, and there is
> > even a specific function ast_say_date() to do that...
> >
> > So we could just call ast_say_date() if the caller does not
> > override the format, or ast_say_date_with_format() otherwise ?
>
> Sounds reasonable.

It was for historic reasons only (i.e. when SayUnixTime was written,
we didn't have the defaults in the Say apps).  I agree; those defaults
belong in say.c.

-- 
Tilghman



More information about the asterisk-dev mailing list