Time in the EMR not in sync with the configured timezone


We have installed OpenEMR 7.0 locally in our clinic. We have updated timezone in php.ini to be Asia/Karachi. Same timezone is also updated in the Admin → Globals → Locales.

Currently throughout system we see the time is 13 hours ahead. This is very strange as the time shown by system is not a valid time. I am new user so can’t attach multiple screenshots. Please see screenshots in this onedrive link: Images

Asia/Karachi is UTC+05:00 and system is adding 13 hours which becomes UTC+18:00. I don’t think UTC+18:00 is even a timezone. Also in above onedrive link are the mysql and php timezones screenshots for more clarity.

We are running openemr in xampp.

Can you please suggest how I can fix this issue?

Numan Ilyas

hi @nilyas121 , did you restart the apache server inside of xampp after you made the changes?

Yes Stephen, we restarted apache multiple times. It did picked up the timezone change but not sure why it’s adding 13 hours to the system time.

Try putting the time zone in \xampp\php\php.ini : date.timezone = Asia/Karachi. Then create a script (for example info.php) with the following:


in htdocs. Restart Apache and check in the browser http://localhost/info.php if the time zone is correct

1 Like

thanks @luisuriarte for reviewing this. We have made the change in the xampp\php\php.ini and phpinfo shows correct timezone. Please see below:

Check the timezone setting in your MySQL/MariaDB server, all the timestamps in your data tables are determined by that, setting the PHP timezone will have no effect on the records the SQL daemon is writing.

what’s your setting in Admin->Config/Locale?

Thank you @Penguin8R - it was the issue. System timezone was set to Pacific (UTC-8). However system clock was manually updated to be in Asia/Karachi. Mysql timezone was set to SYSTEM so it was causing the problem.
I think this incorrect setup was leading to incorrect calculation in open-emr and it was showing time as UTC+13.
Thanks again!

Thank you @stephenwaite for checking. Locale setting is correct. Issue was the system timezone. It was set to Pacific (UTC-8) and system clock was manually overridden to Asia/Karachi which caused confusion.