Index: funcs/func_logic.c =================================================================== --- funcs/func_logic.c (revision 161639) +++ funcs/func_logic.c (working copy) @@ -156,7 +156,7 @@ if (iffalse) iffalse = ast_strip_quoted(iffalse, "\"", "\""); - ast_copy_string(buf, ast_check_timing(&timing) ? iftrue : iffalse, len); + ast_copy_string(buf, ast_check_timing(&timing, NULL) ? iftrue : iffalse, len); return 0; } Index: include/asterisk/pbx.h =================================================================== --- include/asterisk/pbx.h (revision 161639) +++ include/asterisk/pbx.h (working copy) @@ -122,7 +122,7 @@ }; int ast_build_timing(struct ast_timing *i, const char *info); -int ast_check_timing(const struct ast_timing *i); +int ast_check_timing(const struct ast_timing *i, const char *timezone); struct ast_pbx { int dtimeoutms; /*!< Timeout between digits (milliseconds) */ Index: main/pbx.c =================================================================== --- main/pbx.c (revision 161639) +++ main/pbx.c (working copy) @@ -1383,7 +1383,7 @@ if (!i->hastime) return 1; - return ast_check_timing(&(i->timing)); + return ast_check_timing(&(i->timing), NULL); /* FIXME: is there a specified timezone to use here? */ } static void pbx_destroy(struct ast_pbx *p) @@ -6835,12 +6835,12 @@ return 1; } -int ast_check_timing(const struct ast_timing *i) +int ast_check_timing(const struct ast_timing *i, const char *timezone) { struct ast_tm tm; struct timeval now = ast_tvnow(); - ast_localtime(&now, &tm, NULL); + ast_localtime(&now, &tm, timezone); /* If it's not the right month, return */ if (!(i->monthmask & (1 << tm.tm_mon))) @@ -8402,23 +8402,37 @@ */ static int pbx_builtin_gotoiftime(struct ast_channel *chan, void *data) { - char *s, *ts, *branch1, *branch2, *branch; + char *s, *ts, *branch1, *branch2, *branch, *timezone = NULL; struct ast_timing timing; + int num_fields = 1, i = 0, slen = -1; if (ast_strlen_zero(data)) { - ast_log(LOG_WARNING, "GotoIfTime requires an argument:\n