Arizona and Daylight savings time

jimmyfoo wrote on Monday, October 03, 2011:

I have a client that brought this to mi attention last week.

System
Ubuntu 10.04.3 LTS

Software
Open EMR 3.1.0 through 4.1.0 has this issue

Time zone set on the Ubuntu server.
America/Phoenix (Mountain Standard Time - Arizona)

Problem:
During the spring daylight savings time change (UTC-6) openemr is changing the time to one hour in the future. Once the fall change happens then it is back to normal (UTC-7).  I know this is the correct behavior however in Arizona we are always UTC-7 unless on the Navajo Nation they do observere daylight savings time.

To repeat the issue:
Install any one of the openemr deb packages for 3.1.0 to 4.1.0 they all do it.  Create a patient.  Add a patient note and the time the note is created is an hour in the future.

yehster wrote on Monday, October 03, 2011:

This is really more of an issue with Ubuntu and not specifically with OpenEMR.   I suggest that you look for advice on a general linux forum or google how to disable automatic daylight savings time changes for your system.

jimmyfoo wrote on Monday, October 03, 2011:

that is not true the time on the system is fine it is openemr.  if I check the hardware and system time they are set correctly.  This only started happening since the spring daylight saving change.

jimmyfoo wrote on Monday, October 03, 2011:

I have also been able to reproduce the issue on two separate systems.

jimmyfoo wrote on Saturday, October 08, 2011:

yehster both of us were wrong it had to do with PHP and the setting in date.timezone in PHP.INI.  Here was the fix:

; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = “America/Phoenix”

Hope this helps someone else.

Jim

date.timezone = “America/Phoenix”