Index: apps/app_sayunixtime.c =================================================================== --- apps/app_sayunixtime.c (revision 12498) +++ apps/app_sayunixtime.c (working copy) @@ -80,7 +80,7 @@ int res = 0; struct localuser *u; time_t unixtime; - + if (!data) return 0; @@ -89,18 +89,28 @@ LOCAL_USER_ADD(u); - args.format = "c"; /* default datetime */ - AST_STANDARD_APP_ARGS(args, parse); - ast_get_time_t(args.timeval, &unixtime, time(NULL), NULL); + if (ast_strlen_zero(args.timeval)) { + time(&unixtime); + } else { + ast_get_time_t(args.timeval, &unixtime, time(NULL), NULL); + } + + if (ast_strlen_zero(args.format)) { + if (!strcasecmp(chan->language, "da") || !strcasecmp(chan->language, "de")) { + args.format = "A dBY HMS"; + } else { + args.format = "ABdY 'digits/at' IMp"; + } + } + if (chan->_state != AST_STATE_UP) res = ast_answer(chan); if (!res) - res = ast_say_date_with_format(chan, unixtime, AST_DIGIT_ANY, - chan->language, args.format, args.timezone); + res = ast_say_date_with_format(chan, unixtime, AST_DIGIT_ANY, chan->language, args.format, args.timezone); LOCAL_USER_REMOVE(u);