[Home]

Summary:ASTERISK-04313: SayUnixTime doesn't parse 21-29, 31 (twenty first, thirty first, etc) dates properly
Reporter:Zachary McGibbon (mzac)Labels:
Date Opened:2005-06-01 14:24:49Date Closed:2011-06-07 14:10:43
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20050601__STABLE__say.diff.txt
Description:SayUnixTime doesn't parse the date correctly when date is between 21-29, or 31st of the month.  The command returns for example: 'May twenty two' instead of 'May twenty second'

****** ADDITIONAL INFORMATION ******

This can be fixed in 'say.c' by changing line 1990 from:

snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_mday - 20);

to

snprintf(nextmsg,sizeof(nextmsg), "digits/h-%d", tm.tm_mday - 20);

(adding h- in front of the %d)
Comments:By: Clod Patry (junky) 2005-06-01 14:29:43

Thanks, but next time, please attach patch, like said in the bug guidelines.

By: Tilghman Lesher (tilghman) 2005-06-01 14:46:08

Good catch.  Bug introduced in say.c#1.18 (13 months ago).

By: Tilghman Lesher (tilghman) 2005-06-01 14:47:12

Oh, and 31st was fine, because it used a special case for that number alone.

By: Russell Bryant (russell) 2005-06-01 23:11:32

fixed in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:36:39.000-0600

Repository: asterisk
Revision: 5808

U   branches/v1-0/say.c

------------------------------------------------------------------------
r5808 | russell | 2008-01-15 15:36:39 -0600 (Tue, 15 Jan 2008) | 2 lines

fix SayUnixTime (bug ASTERISK-4313)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5808