[Freeswitch-users] mod_say or strftime problems?

Michael Jerris mike at jerris.com
Sat Apr 24 12:04:44 PDT 2010


Boris opened http://jira.freeswitch.org/browse/MODAPP-421 .  I'll take a look into this one.

Thanks for the report.

Mike

On Apr 22, 2010, at 6:22 PM, Michael Collins wrote:

> Would you please open a JIRA on this one?
> -MC
> 
> On Thu, Apr 22, 2010 at 6:55 AM, <boris at tagnet.ru> wrote:
> IMHO this is bug, as of struct tm man page:
>  int tm_hour;    /* hours (0 - 23) */
> so tm_hour shouldn't be incremented. But looking at code I see no reason
> why the behavior is changed with different timezone.
> 
> > I have same problem with mod_say_ru if timezone is set to
> >
> > <action application="set" data="timezone=Europe/Kiev"/>
> >
> > And i don't understand why  "tm.tm_hour + 1"
> > In source code
> >         if (say_time) {
> >                 switch_snprintf(buf, sizeof(buf), "%d:%d:%d", tm.tm_hour +
> > 1,
> > tm.tm_min, tm.tm_sec);
> >                 say_args->type = SST_TIME_MEASUREMENT;
> >                 ru_say_time(session, buf, say_args, args);
> >
> > As temporary resolution i just set different timezone :)
> >
> >
> > On Wednesday 21 April 2010 17:30:18 boris at tagnet.ru wrote:
> >> Hello!
> >>
> >> I have an extension for the current date/time:
> >>     <extension name="SayTime">
> >>         <condition field="destination_number" expression="^9000$">
> >>             <action application="answer"/>
> >>             <action application="say" data="ru current_date_time
> >> pronounced $strftime(%s)"/>
> >>             <action application="sleep" data="1000"/>
> >>             <action application="hangup"/>
> >>         </condition>
> >>     </extension>
> >>
> >> The extension works fine, but time is +1 hour of current time. For
> >> example
> >> current time is 16:00, the extension says 17:00. I use FreeSwitch 1.0.6
> >> (from release tarball), CentOS 5.4, ntp synched, timezone YEKT (summer
> >> time in effect now, so tz=YEKST). So, my question is - something wrong
> >> with my extension configuration or this is bug in mod_say_ru or may be
> >> strfmt?
> >>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100424/81c18b93/attachment-0001.html 


More information about the FreeSWITCH-users mailing list