]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
SIP-686 changed mod_say (en) to speak full dates when asked to speak a date in the...
authorMichael MCGuinness <mmcguinness@grasshopper.com>
Mon, 7 Apr 2014 20:21:22 +0000 (16:21 -0400)
committerBrian West <brian@freeswitch.org>
Fri, 2 May 2014 19:48:09 +0000 (14:48 -0500)
src/mod/say/mod_say_en/mod_say_en.c

index 6635de7491bdccb48c9b373b1d420c33d53520b2..255b663ae9a78f2ccea911c22bc891a48c838948 100644 (file)
@@ -306,6 +306,15 @@ static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, sw
                break;
        case SST_SHORT_DATE_TIME:
                say_time = 1;
+               //Time is in the future
+               if ((tm.tm_year > tm_now.tm_year) || 
+                   (tm.tm_year == tm_now.tm_year && tm.tm_mon > tm_now.tm_mon) || 
+                   (tm.tm_year == tm_now.tm_year && tm.tm_mon == tm_now.tm_mon && tm.tm_mday > tm_now.tm_mday))
+               {
+                       say_date = 1;
+                       break;
+               }
+               //Time is today or earlier
                if (tm.tm_year != tm_now.tm_year) {
                        say_date = 1;
                        break;