Index: include/asterisk/localtime.h =================================================================== --- include/asterisk/localtime.h (revision 312285) +++ include/asterisk/localtime.h (working copy) @@ -35,7 +35,7 @@ int tm_yday; /*!< Days in year.[0-365] */ int tm_isdst; /*!< DST. [-1/0/1]*/ long int tm_gmtoff; /*!< Seconds east of UTC. */ - char *tm_zone; /*!< Timezone abbreviation. */ + const char *tm_zone; /*!< Timezone abbreviation. */ /* NOTE: do NOT reorder this final item. The order needs to remain compatible with struct tm */ int tm_usec; /*!< microseconds */ }; Index: main/stdtime/localtime.c =================================================================== --- main/stdtime/localtime.c (revision 312285) +++ main/stdtime/localtime.c (working copy) @@ -1296,9 +1296,7 @@ #ifndef SOLARIS /* Solaris doesn't have this element */ tmp->tm_gmtoff = ttisp->tt_gmtoff; #endif -#ifdef TM_ZONE - tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind]; -#endif /* defined TM_ZONE */ + tmp->tm_zone = &sp->chars[ttisp->tt_abbrind]; tmp->tm_usec = timep->tv_usec; return result; } @@ -1449,17 +1447,15 @@ AST_LIST_UNLOCK(&zonelist); result = timesub(timep, offset, sp, tmp); -#ifdef TM_ZONE /* ** Could get fancy here and deliver something such as ** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero, ** but this is no time for a treasure hunt. */ if (offset != 0) - tmp->TM_ZONE = " "; + tmp->tm_zone = " "; else - tmp->TM_ZONE = sp->chars; -#endif /* defined TM_ZONE */ + tmp->tm_zone = sp->chars; return result; } Index: res/res_phoneprov.c =================================================================== --- res/res_phoneprov.c (revision 312285) +++ res/res_phoneprov.c (working copy) @@ -395,6 +395,10 @@ snprintf(buffer, sizeof(buffer), "%d", tm_info.tm_hour); if ((var = ast_var_assign("DST_END_HOUR", buffer))) AST_LIST_INSERT_TAIL(headp, var, entries); + + if ((var = ast_var_assign("TIMEZONE", S_OR(zone, tm_info.tm_zone)))) { + AST_LIST_INSERT_TAIL(headp, var, entries); + } } /*! \brief Callback that is executed everytime an http request is received by this module */