]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_say_en] change epoch to 64 bit int 1765/head
authoragree <ahrongreenberg@gmail.com>
Sun, 21 Aug 2022 05:16:36 +0000 (01:16 -0400)
committeragree <ahrongreenberg@gmail.com>
Sun, 21 Aug 2022 05:16:36 +0000 (01:16 -0400)
handle time after 2038-01-18 22:14:07

src/mod/say/mod_say_en/mod_say_en.c

index 5ea52357ddc78482f8888277164d62bf8154351d..1f8d6e017a80dbf112bb8547ea1df3f14d7b2412 100644 (file)
@@ -196,7 +196,7 @@ static switch_status_t en_say_general_count(switch_say_file_handle_t *sh, char *
 
 static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, switch_say_args_t *say_args)
 {
-       int32_t t = 0;
+       int64_t t = 0;
        switch_time_t target = 0, target_now = 0;
        switch_time_exp_t tm, tm_now;
        uint8_t say_date = 0, say_time = 0, say_year = 0, say_month = 0, say_dow = 0, say_day = 0, say_yesterday = 0, say_today = 0;
@@ -287,7 +287,7 @@ static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, sw
 
        if (strchr(tosay, ':')) {
                switch_time_t tme  = switch_str_time(tosay);
-               t = (int32_t) ((tme) / (int64_t) (1000000));
+               t = (int64_t) ((tme) / (int64_t) (1000000));
                
                target = switch_time_make(t, 0);
                target_now = switch_micro_time_now();