Changing OpenMRS timezone

I have the Platform 2.4.0 WAR file running with all the modules that make up the reference application. I am trying to update the instances I have running within tomcat to reflect West African Time (WAT), but I do not see any configuration option to do so.

Any help would be greatly appreciated!

This is a thorny subject depending on which distribution of OpenMRS you are using. Some reading first:

In theory you should not have anything to do. In practise however, you may have stuff to do if you are using Ref App 2.x, see RA-1906 that is still WIP.

So, which distribution are you using?

Thanks for the quick reply back. I’m using V2.3.2

Is this something I can fix with a small configuration change or UI change?

This epic that I shared with you (RA-1906) was necessary for Ref App 2.x to properly adhere to typical web apps best practises as stated in the timezones conventions wiki page. In short: everything should be fine as long as datetimes are shared in the ISO-8601 format between clients and server.

Is that the concern you have?

Otherwise the single most important thing IMO is to keep Tomcat and MySQL on the same timezone, in which case it should be UTC.

  • The reason why you would want to keep those two on the same timezone is because there are bugs with the old JDBC connector that is used in OpenMRS. See here for instance: 'Upgrade mysql-connector to at least v8.0.23 for platform 2.4.0
    The JDBC connector will deceive you in certain cases, so better not ask it to convert anything.
  • The reason why you would want to stick to UTC is because in the ancient version of MySQL that OpenMRS uses (5.6 or 5.7) datetimes are stored like this, eg: 2020-09-04 19:22:11 … without timezone information attached.
    And a datetime without timezone info should be assumed to be on UTC.

@ibacher @jfigueiredo anything you think should be added?


P.S. @danialbet you haven’t told me which distribution you are using (you just told me that you were using Core 2.3.2), but if you are using the Ref App then yes there will be settings to ensure that timezone conversions do happen. That’s only with Ref App 2.x as soon as RA-1906 is completed.