|
|
|
@ -3062,8 +3062,8 @@ int ast_say_date_pt(struct ast_channel *chan, time_t t, const char *ints, const
|
|
|
|
|
struct tm tm;
|
|
|
|
|
char fn[256];
|
|
|
|
|
int res = 0;
|
|
|
|
|
ast_localtime(&t,&tm,NULL);
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
snprintf(fn, sizeof(fn), "digits/day-%d", tm.tm_wday);
|
|
|
|
|
if (!res)
|
|
|
|
|
res = wait_file(chan, ints, fn, lang);
|
|
|
|
@ -5637,7 +5637,8 @@ int ast_say_time_en(struct ast_channel *chan, time_t t, const char *ints, const
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
int hour, pm=0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
hour = tm.tm_hour;
|
|
|
|
|
if (!hour)
|
|
|
|
|
hour = 12;
|
|
|
|
@ -5683,7 +5684,8 @@ int ast_say_time_de(struct ast_channel *chan, time_t t, const char *ints, const
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
if (!res)
|
|
|
|
|
res = ast_say_number(chan, tm.tm_hour, ints, lang, "n");
|
|
|
|
|
if (!res)
|
|
|
|
@ -5701,7 +5703,8 @@ int ast_say_time_hu(struct ast_channel *chan, time_t t, const char *ints, const
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
if (!res)
|
|
|
|
|
res = ast_say_number(chan, tm.tm_hour, ints, lang, "n");
|
|
|
|
|
if (!res)
|
|
|
|
@ -5722,7 +5725,8 @@ int ast_say_time_fr(struct ast_channel *chan, time_t t, const char *ints, const
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
|
|
|
|
|
res = ast_say_number(chan, tm.tm_hour, ints, lang, "f");
|
|
|
|
|
if (!res)
|
|
|
|
@ -5739,7 +5743,8 @@ int ast_say_time_nl(struct ast_channel *chan, time_t t, const char *ints, const
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
if (!res)
|
|
|
|
|
res = ast_say_number(chan, tm.tm_hour, ints, lang, (char *) NULL);
|
|
|
|
|
if (!res)
|
|
|
|
@ -5758,7 +5763,8 @@ int ast_say_time_pt(struct ast_channel *chan, time_t t, const char *ints, const
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
int hour;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
hour = tm.tm_hour;
|
|
|
|
|
if (!res)
|
|
|
|
|
res = ast_say_number(chan, hour, ints, lang, "f");
|
|
|
|
@ -5784,7 +5790,8 @@ int ast_say_time_pt_BR(struct ast_channel *chan, time_t t, const char *ints, con
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
|
|
|
|
|
res = ast_say_number(chan, tm.tm_hour, ints, lang, "f");
|
|
|
|
|
if (!res) {
|
|
|
|
@ -5813,7 +5820,8 @@ int ast_say_time_tw(struct ast_channel *chan, time_t t, const char *ints, const
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
int hour, pm=0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
hour = tm.tm_hour;
|
|
|
|
|
if (!hour)
|
|
|
|
|
hour = 12;
|
|
|
|
@ -5882,7 +5890,8 @@ int ast_say_datetime_en(struct ast_channel *chan, time_t t, const char *ints, co
|
|
|
|
|
char fn[256];
|
|
|
|
|
int res = 0;
|
|
|
|
|
int hour, pm=0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
if (!res) {
|
|
|
|
|
snprintf(fn, sizeof(fn), "digits/day-%d", tm.tm_wday);
|
|
|
|
|
res = ast_streamfile(chan, fn, lang);
|
|
|
|
@ -5945,7 +5954,8 @@ int ast_say_datetime_de(struct ast_channel *chan, time_t t, const char *ints, co
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
res = ast_say_date(chan, t, ints, lang);
|
|
|
|
|
if (!res)
|
|
|
|
|
ast_say_time(chan, t, ints, lang);
|
|
|
|
@ -5958,7 +5968,8 @@ int ast_say_datetime_hu(struct ast_channel *chan, time_t t, const char *ints, co
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
res = ast_say_date(chan, t, ints, lang);
|
|
|
|
|
if (!res)
|
|
|
|
|
ast_say_time(chan, t, ints, lang);
|
|
|
|
@ -5971,7 +5982,8 @@ int ast_say_datetime_fr(struct ast_channel *chan, time_t t, const char *ints, co
|
|
|
|
|
struct tm tm;
|
|
|
|
|
char fn[256];
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
|
|
|
|
|
if (!res)
|
|
|
|
|
res = ast_say_number(chan, tm.tm_mday, ints, lang, (char *) NULL);
|
|
|
|
@ -6009,7 +6021,8 @@ int ast_say_datetime_nl(struct ast_channel *chan, time_t t, const char *ints, co
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
res = ast_say_date(chan, t, ints, lang);
|
|
|
|
|
if (!res) {
|
|
|
|
|
res = ast_streamfile(chan, "digits/nl-om", lang);
|
|
|
|
@ -6028,7 +6041,8 @@ int ast_say_datetime_pt(struct ast_channel *chan, time_t t, const char *ints, co
|
|
|
|
|
char fn[256];
|
|
|
|
|
int res = 0;
|
|
|
|
|
int hour, pm=0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
if (!res) {
|
|
|
|
|
snprintf(fn, sizeof(fn), "digits/day-%d", tm.tm_wday);
|
|
|
|
|
res = ast_streamfile(chan, fn, lang);
|
|
|
|
@ -6091,7 +6105,8 @@ int ast_say_datetime_pt_BR(struct ast_channel *chan, time_t t, const char *ints,
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
res = ast_say_date(chan, t, ints, lang);
|
|
|
|
|
if (!res)
|
|
|
|
|
res = ast_say_time(chan, t, ints, lang);
|
|
|
|
@ -6105,7 +6120,8 @@ int ast_say_datetime_tw(struct ast_channel *chan, time_t t, const char *ints, co
|
|
|
|
|
char fn[256];
|
|
|
|
|
int res = 0;
|
|
|
|
|
int hour, pm=0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
if (!res)
|
|
|
|
|
res = ast_say_number(chan, tm.tm_year + 1900, ints, lang, (char *) NULL);
|
|
|
|
|
if (!res) {
|
|
|
|
@ -6184,8 +6200,8 @@ int ast_say_datetime_from_now_en(struct ast_channel *chan, time_t t, const char
|
|
|
|
|
|
|
|
|
|
time(&nowt);
|
|
|
|
|
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
localtime_r(&nowt,&now);
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
ast_localtime(&nowt,&now, NULL);
|
|
|
|
|
daydiff = now.tm_yday - tm.tm_yday;
|
|
|
|
|
if ((daydiff < 0) || (daydiff > 6)) {
|
|
|
|
|
/* Day of month and month */
|
|
|
|
@ -6224,8 +6240,8 @@ int ast_say_datetime_from_now_fr(struct ast_channel *chan, time_t t, const char
|
|
|
|
|
|
|
|
|
|
time(&nowt);
|
|
|
|
|
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
localtime_r(&nowt,&now);
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
ast_localtime(&nowt, &now, NULL);
|
|
|
|
|
daydiff = now.tm_yday - tm.tm_yday;
|
|
|
|
|
if ((daydiff < 0) || (daydiff > 6)) {
|
|
|
|
|
/* Day of month and month */
|
|
|
|
@ -6264,8 +6280,8 @@ int ast_say_datetime_from_now_pt(struct ast_channel *chan, time_t t, const char
|
|
|
|
|
|
|
|
|
|
time(&nowt);
|
|
|
|
|
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
localtime_r(&nowt,&now);
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
ast_localtime(&nowt, &now, NULL);
|
|
|
|
|
daydiff = now.tm_yday - tm.tm_yday;
|
|
|
|
|
if ((daydiff < 0) || (daydiff > 6)) {
|
|
|
|
|
/* Day of month and month */
|
|
|
|
@ -6489,7 +6505,7 @@ static int ast_say_time_gr(struct ast_channel *chan, time_t t, const char *ints,
|
|
|
|
|
int res = 0;
|
|
|
|
|
int hour, pm=0;
|
|
|
|
|
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
hour = tm.tm_hour;
|
|
|
|
|
|
|
|
|
|
if (!hour)
|
|
|
|
@ -6534,7 +6550,8 @@ static int ast_say_datetime_gr(struct ast_channel *chan, time_t t, const char *i
|
|
|
|
|
struct tm tm;
|
|
|
|
|
char fn[256];
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* W E E K - D A Y */
|
|
|
|
@ -7024,7 +7041,8 @@ static int ast_say_time_ge(struct ast_channel *chan, time_t t, const char *ints,
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
|
|
|
|
|
res = ast_say_number(chan, tm.tm_hour, ints, lang, (char*)NULL);
|
|
|
|
|
if (!res) {
|
|
|
|
@ -7054,7 +7072,8 @@ static int ast_say_datetime_ge(struct ast_channel *chan, time_t t, const char *i
|
|
|
|
|
{
|
|
|
|
|
struct tm tm;
|
|
|
|
|
int res = 0;
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
res = ast_say_date(chan, t, ints, lang);
|
|
|
|
|
if (!res)
|
|
|
|
|
ast_say_time(chan, t, ints, lang);
|
|
|
|
@ -7077,8 +7096,8 @@ static int ast_say_datetime_from_now_ge(struct ast_channel *chan, time_t t, cons
|
|
|
|
|
|
|
|
|
|
time(&nowt);
|
|
|
|
|
|
|
|
|
|
localtime_r(&t,&tm);
|
|
|
|
|
localtime_r(&nowt,&now);
|
|
|
|
|
ast_localtime(&t, &tm, NULL);
|
|
|
|
|
ast_localtime(&nowt, &now, NULL);
|
|
|
|
|
daydiff = now.tm_yday - tm.tm_yday;
|
|
|
|
|
if ((daydiff < 0) || (daydiff > 6)) {
|
|
|
|
|
/* Day of month and month */
|
|
|
|
|