Wrong Time Stamp on Voicemails

Status
Not open for further replies.

Frank

Member
Dec 28, 2016
61
10
8
67
The server time is correct in System Status.

Date Mon, 15 May 2017 15:21:08 -0400

Dialing *9170 or *97 the time is off by +4 hrs. Voicemail time stamp is also off by +4hrs.

Domain Time Zone is set to time_zone name America/Toronto True which is correct.

It seems that the system is saying the GMT time.

I can get around this by setting the time zone in the dial plan manager for both *9170 and *97.

Is there a way that the dial plan can detect the Time Zone by the setting in the User Profile??

This would solve the issue of users being in different time zones.
 
Last edited:
  • Like
Reactions: Jon Clark

zenvoip

Member
Jul 19, 2018
36
2
8
59
The FusionPBX is using the OS time.

For debian, display the current system time, enter the date command:
debian:~# date

Update your current time by entering the command:
root@fusionpbx:~# dpkg-reconfigure tzdata
 

markjcrane

Active Member
Staff member
Jul 22, 2018
503
177
43
49
Also if using virtual machine make sure the parent server that is hosting the virtual machine has the correct time.
Then make sure in Default Settings -> Domain and time_zone is set when you do this it will update the time zone in Advanced -> Variables.
You can go look make sure edit a value in Advanced -> Variables and press save this will rewrite the vars.xml file.

With these suggestions and others mentioned it should work for you.
 

wa4zlw

Member
Jun 7, 2019
131
2
18
70
Blandon, PA
www.myinternetsupport.com
Hi all....i've had the same issue. But I've figured out the following:

1. based on other threads I set the domain TZ=AMerica/New York
2. user TZ set sameSnooping around I found thi
3. dial in and leave a VM on my extension.
4. If I call in and listen to the VM on the PBX the spoken time and date is correct TZ; the email notification is wrong and is UTC.

snooping around in the email template you find
Code:
local message_date = os.date("%A, %d %b %Y %I:%M %p", created_epoch);

From what I see the template is taking the only the OS timestamp not what the user's time should be. Or rather it doesnt calculate it for the actual user.

Can we get this fixed please?

Thanks leon
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
Can we get this fixed please?

Thanks leon

Without checking my system or GitHub to see if it is still a problem, my suggestion if you notice a bug like this is to report it on fusionpbx.com

You have to sign up for at least the free account to report bugs, but is the only reliable way to ensure the developers will check and/or resolve the issue.
 

junction1153

Member
Jul 15, 2020
56
16
8
34
Since this has not yet been addressed, here is the fix:

Code:
sudo apt-get install lua5.2 luarocks
luarocks install luatz
cp -r /usr/local/lib/luarocks/rocks/luatz/ /usr/share/freeswitch/scripts/
chown -R www-data:www-data /usr/share/freeswitch/scripts/luatz

Edit: /usr/share/freeswitch/scripts/app/voicemail/resources/functions/send_email.lua
Add:
Code:
local tz = require "luatz.init"
timezone = session:getVariable("timezone");

then replace
Code:
local message_date = os.date("%A, %d %b %Y %I:%M %p", created_epoch);

with:
Code:
local message_date = os.date("%A, %d %b %Y %I:%M %p", tz.time_in(timezone));
 
Last edited:

markjcrane

Active Member
Staff member
Jul 22, 2018
503
177
43
49
This issue has been solved in latest 4.5.x. I committed a fix a few minutes ago. I did not use the method described in the last message. The reason why is that method would requires new dependency and would break everyone that upgrades until they add the dependencies. Still thanks for sharing your solution.

In the commit used PostgreSQL's native timezone and date time formatting with an existing query so extra SQL queries were not required.
 

junction1153

Member
Jul 15, 2020
56
16
8
34
This issue has been solved in latest 4.5.x. I committed a fix a few minutes ago. I did not use the method described in the last message. The reason why is that method would requires new dependency and would break everyone that upgrades until they add the dependencies. Still thanks for sharing your solution.

In the commit used PostgreSQL's native timezone and date time formatting with an existing query so extra SQL queries were not required.

There seems to be an issue with the update. All times will show up as X:09:XX.

In other words, the TZ is correct, the hours are correct, the minutes will always be displayed as 09, and the seconds are correct. I am unable to figure out how to rectify that. I will also file a bug report if I do not figure this out in the next hour.

Edit: issue resolved, posting on git now for the fix
 
Last edited:

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
I believe this still to be an issue. My Call detail records display Eastern time ok, the time displayed on the server says Eastern but still shows UTC
So when callers call in to check their voice mail the voice mail is reading UTC time, not Eastern time.

Fusionpbx version 4.5.26

Current default time zone: 'US/Eastern'
Local time is now: Wed Jul 14 12:40:55 EDT 2021.
Universal Time is now: Wed Jul 14 16:40:55 UTC 2021

I need the time stamp to read the Eastern Time value, not the UTC time value

Any ideas?
 
Status
Not open for further replies.