$VM_DATE in voicemail.conf prints incorrect time in email

Hey, all! Got a problem I need some outside advice on.

Using the FreePBX Distro, everything’s up-to-date.

I’m having some issues with the time returned from $VM_DATE as used by voicemail.conf to generate a voicemail email notification, thanks of course to daylight savings time.

The PBX is using MDT (America/Denver), but this particular user is in Arizona, which is currently using MST, one hour behind MDT. The user’s UCP shows the time in MST, and calling the mailbox also yields a time in MST, but the voicemail notification email is printing the time in MDT instead of MST, and the user is raising a stink about it.

I’ve got a zonemessage defined as arizona=America/Pheonix|'vm-received' Q 'digits/at' IMp, but configuring the mailbox to use this timezone results in the time being printed seven hours ahead of the user instead of just one.

When using above zonemessage:

  • In email: 10:17:04 PM
  • Actual MST: 3:17:04 PM
  • Actual MDT: 4:17:04 PM

When using no zonemessage:

  • In email: 3:37:20 PM
  • Actual MST: 2:27:20 PM
  • Actual MDT: 3:37:20 PM

Relevant info:

  • PHP Timezone is America/Denver.
  • System Admin > Time Zone is America/Denver.
  • User Management > User Details is set to (America/)Phoenix.
  • date returns the correct time in MDT.
  • timedatectl shows that local time is in MDT and DST is active.
  • The PBX hardware clock is in UTC.

I’m really scratching my head on this one; I’m not sure what else to try. Any ideas?

There is no place called Pheonix, although there is one called Phoenix.

$ TZ=America/Pheonix date; TZ=America/Phoenix date; TZ=America/Denver date
Fri 24 Mar 17:45:24 America 2023
Fri 24 Mar 10:45:24 MST 2023
Fri 24 Mar 11:45:24 MDT 2023

1 Like

Oh my god… :person_facepalming:

Thanks very much for taking a look, David! It works exactly as expected when Phoenix is spelled correctly.

I can’t believe I blew my first post having someone spellcheck for me.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.