]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Incorrect playback for Spanish in some circumstances
authorKinsey Moore <kmoore@digium.com>
Mon, 1 Aug 2011 15:22:10 +0000 (15:22 +0000)
committerKinsey Moore <kmoore@digium.com>
Mon, 1 Aug 2011 15:22:10 +0000 (15:22 +0000)
When you say the time in spanish and it is 01:00 - 01:59 or 13:00 - 13:59 you
must use female pronunciation "1F". The function "say_date_with_format_es" does
not take this in account.

(closes ASTERISK-15016)
Patch-by: Luis Jimenez
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330433 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/say.c

index b57989ef39098245f6d8f19b90cb3377602e9281..7217bc9a6db3adab1abc25f94cc2a79f1429c14c 100644 (file)
@@ -4716,6 +4716,8 @@ int ast_say_date_with_format_es(struct ast_channel *chan, time_t t, const char *
                                /* 12-Hour */
                                if (tm.tm_hour == 0)
                                        ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
+                               else if (tm.tm_hour == 1 || tm.tm_hour == 13)
+                                       snprintf(nextmsg,sizeof(nextmsg), "digits/1F");
                                else if (tm.tm_hour > 12)
                                        snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
                                else