Page 1 of 1

Arizona DST Issue

PostPosted: Mon Mar 30, 2009 9:43 pm
by cuimalo
The VICIDIAL www client is reporting the incorrect time when the agent located in Arizona as it factors in DST. This borks up VDAD reports (on www admin) and time clock.

I have the same issue with both SVN rev.1087 and stable branches. I am using a Phoenix or Arizona /etc/localtime.

Looks like the .php is doing a isdst call.

This issue was also reported in the "Arizona DST Issue" thread of Mar 11, 2008.

Resolution gents?

PostPosted: Mon Mar 30, 2009 9:44 pm
by cuimalo
Thanks to both williamconley from poundteam.com and mflorell from vicidial.com for all the help in the past.

PostPosted: Mon Mar 30, 2009 10:46 pm
by mflorell
So is this a PHP issue where it is reporting isdst as being on?

There are other users that are in Arizona that don't have these problems. I believe enjay has quite a bit of experience with Arizona and could probably help you diagnose this problem.

PostPosted: Tue Mar 31, 2009 4:35 pm
by cristian
Debug for the record:
Create a PHP file in your webroot that contains
<?php echo '<h1>SERVER DATE/TIME IS '.date('Y-m-d H:i:s').'</h1>';phpinfo();?>

If the time it prints out is wrong, its a php/localtime/system issue. Check the 'Default timezone' further down the page.

PostPosted: Tue Mar 31, 2009 5:09 pm
by cristian
Solution for the record:
PHP5 doesn't really trust the systems time zone. Modify (or insert) this directive into php.ini
Code: Select all
date.timezone = America/Phoenix

For a full list of time zones go to the php manual and search timezones.

Good call Matt.

PostPosted: Tue Mar 31, 2009 7:05 pm
by mflorell
Thank you very much for posting your solution!

PostPosted: Tue Mar 31, 2009 8:34 pm
by cristian
Thanks for vici!