Summary:ASTERISK-15541: Timezone (tz) parameter won't apply for users.conf
Reporter:ad (ad)Labels:
Date Opened:2010-01-29 03:57:30.000-0600Date Closed:2015-02-25 20:15:08.000-0600
Versions:Frequency of
Description:I've set tz=european in general settings of voicemail.conf

After having reloaded all the modules, time zone is still not correctly set for users I've put in users.conf. The only manner to make it work is to add manually the voicemails entries in voicemail.conf, specifying the tz parameter.

Occurs with all versions up to 1.4.28.
Comments:By: Matt Jordan (mjordan) 2015-02-25 20:14:58.605-0600

Based on my read-through of current Asterisk 11 {{app_voicemail}}, this should not occur.
# We parse {{"tz"}} out of the {{"general"}} section:
if ((val = ast_variable_retrieve(cfg, "general", "tz"))) {
ast_copy_string(zonetag, val, sizeof(zonetag));
# When parsing a mailbox out of {{users.conf}}, we apply defaults via {{populate_defaults}}:
if (ucfg) {
for (cat = ast_category_browse(ucfg, NULL); cat ; cat = ast_category_browse(ucfg, cat)) {
if (!strcasecmp(cat, "general")) {
if (!ast_true(ast_config_option(ucfg, cat, "hasvoicemail")))
if ((current = find_or_create(userscontext, cat))) {
# And {{populate_defaults}} applies the {{zonetag}} setting to the created {{vmu}} object:
ast_copy_string(vmu->zonetag, zonetag, sizeof(vmu->zonetag));

If someone finds this is still an issue and can reproduce it in a supported version of Asterisk, please comment here and I'll be happy to reopen it. All of that being said, {{users.conf}} is not supported much, and doesn't receive much attention. A patch that corrects the behaviour would help a lot in resolving any problems with it.