Voicemail wrong timezone

Hi, I’d configured America/Lima timezone for my voicemail but I still receiving my messages in UTC.

My voicemail config:

[general] format=wav skipms=3000 maxsilence=10 silencethreshold=128 maxlogins=3 tz=peru maxmsg=100 ; [zonemessages] peru=America/Lima|'vm-received' a d b 'digits/at' HM ; [default] 1004=>1004,PRODUCTOS NATURALES,,,tz=peru

Timezone was correctly loaded by asterisk

[code]# asterisk -rx "voicemail show zones"
Setting max files open to 10000
Zone Timezone Message Format
peru America/Lima ‘vm-received’ a d b ‘digits/at’ HM

asterisk -rx “voicemail show users for default”

Setting max files open to 10000
Context Mbox User Zone NewMsg
default general New User 0
default 1004 PRODUCTOS NATURALES peru 30[/code]

My sip user config:

[1044] type=friend secret=1044 mailbox=1044@default host=dynamic dtmfmode=rfc2833 context=extensiones canreinvite=no callerid=Extension 1044 <1044>

I’d changed localtime to America/Lima

# date Sun Jun 5 14:13:23 PET 2011

The hwclock is in localtime too

# hwclock Sun 05 Jun 2011 02:14:27 PM PET -0.228454 seconds

CDR registers is configured with localtime

[csv] usegmtime=no loguniqueid=yes loguserfield=yes accountlogs=no

But voicemail messages still appearing in UTC

# cat /var/spool/asterisk/voicemail/default/1004/INBOX/msg0001.txt ; ; Message Information file ; [message] origmailbox=1004 context=extensiones macrocontext= exten=1004-CHANUNAVAIL priority=1 callerchan=SIP/xxxxxxxxxx callerid="P. Naturales" <xxxxxxxxx> origdate=Sun Jun 5 07:18:43 PM UTC 2011 origtime=1307241403 category= flag= duration=17

I’d read a lot of forums but I still without success. Thanks in advace for your valuable help.

I forgot the asterisk version I´m using

# asterisk -rx "core show version" Setting max files open to 10000 Asterisk built by root @ xxxxxxxx on a x86_64 running Linux on 2011-06-05 06:07:50 UTC

I believe the time in the file is always stored in UTC. When it is reading it back to you, it will convert it from UTC to the desired timezone.

keep in mind that each mailbox can have a different timezone setting.

Thanks for your answer mazzic, but I’ve made same configuration on a Debian machine, and it works. Indeed, time is in localtime, because voicemail information is written in a text file, like that:

[message] origmailbox=100 context=extensiones macrocontext= exten=100 priority=1 callerchan=Console/dsp callerid=Unknown origdate=Sun Jun 5 09:16:44 PM COT 2011 origtime=1307326604 category= duration=0

But I still without having success on CentOS, and these machine is in production and try to reinstall, it’s complicated. Any other idea?

no ideas at this time…

but I can say I’m seeing the same results. I’m on CentOS 5.6 with Asterisk

[root@pbx1 ~]# date
Mon Jun  6 22:56:41 CDT 2011
[root@pbx1 ~]# hwclock
Mon 06 Jun 2011 10:57:04 PM CDT  -0.153960 seconds
[root@pbx1 INBOX]# ls -l
total 12
-rw-rw-rw- 1 root root  285 Jun  6 23:02 msg0000.txt
-rw-r--r-- 1 root root 6300 Jun  6 23:02 msg0000.WAV
[root@pbx1 INBOX]# cat msg0000.txt
; Message Information file
callerid="xxx" <xxxxx>
origdate=Tue Jun  7 04:02:31 AM UTC 2011

Mazzic, and you hear the localtime of message when access your voicemail through your phone, or when check INBOX with webvmail?

Thanks in advance for your valuable opinion.

I’m having the same issue on Fedora 11. It was working fine with asterisk 1.4.38, but when I upgraded to asterisk the timezone is showing UTC. This is very annoying as I use the web voicemail all the time…

Please HELP!! What could it be?

[quote=“krtapas”]Mazzic, and you hear the localtime of message when access your voicemail through your phone, or when check INBOX with webvmail?

Thanks in advance for your valuable opinion.[/quote]

yes, when I listen to my messages through voicemail, it states the time of the message in localtime. For instance the test that I just conducted states the message was left at 9:41 PM central time.

The line from the msg0000.txt file is:
origdate=Fri Jun 10 02:41:43 AM UTC 2011