Patient Appoinments - error about right time zone

When I want to add ‘Patient Appointment’ I get error:

“Your computer is not set to the right time zone. Please change to Eastern Standard Time and then close and restart your browser to assure proper scheduling functionality.”

Shouldn’t be that every time zone is right?

I think it is by design and you should simply change the timezone of your PC to match the timezone of the server.

I hope not.

Asking users to change their PC’s time zone to use a web app is not a reasonable request. :slight_smile:

Well I am guessing it simplified time widgets in the UI. It could be fixed with some extra effort, but apparently no implementation had an issue with that yet (all having servers and clients in the same time zone).

@tgreensweig may have a different answer to that :smile:

1 Like

This is a known limitation. We were running into issues with time zone differences between client machines and the server when building out the new appointment scheduling UI and there was no obvious, easy fix, so we made the requirement that that the client machine and the server need to be in the same time zone–which should be true anyway for 98% of our current use cases. However, as @michael points out this is less-than-ideal for a generic appointment solution. If somebody has time to ticket and fix I’m all for it. I believe @darius may be tackling this on a broader level.

1 Like

The underlying difficulty is that JavaScript and AngularJS don’t have any built-in support for displaying server datetimes. I have put a little bit of thought into handle this, but haven’t done much of anything.

@natalia, to check, what do you think would be the correct behavior? For example imagine that the server is at a hospital in New York, and you’re logging in from a computer whose timezone is set to Poland. How should this affect the appointment scheduling screens? (I know what I think should happen, but I’m curious what others think.)

1 Like

I think that when I am in Poland and I want to schedule the appointment in USA, it shouldn’t affect my screen, because I have to be in USA on this appointment on USA time zone, not Polish time zone. It shouldn’t matter from which part of the world I schedule the appointment.

1 Like

Have something been done with this error? It is still/again happening.

afaik, there hasn’t been a fix for this.

Error is still appearing how to get rid of it.any solution

Hello Naveed

I’m not quite sure if you have the opportunity to solve the problem (its not really an error in my eyes) is yet but one way that I found of overcoming the situation is to make sure that the server (which in my case is located in a data centre offshore) is the same time zone as the client machines accessing the server.

I would be very reluctant to try and update every single time zone and time on each of the client machines as this will take a lot of time and be quite painful for the end-user.

On a Debian based (such as Ubuntu) Linux server you can change the time zone relatively easily.

Step one find out what time zone is available to you by typing the following command.

root@server:# timedatectl list-timezones

(scroll down using the arrow keys to find the appropriate time zone)

root@server:# timedatectl set-timezone Africa/Johannesburg

If all of your client systems are within the same time zone that Johannesburg is in you should no longer get the error message.

I hope this helps

Regards

Norvan

1 Like

@oliebolz is it referring DB server location or webserver?.

thanks Prapa

@raff @oliebolz same time zone available on my server and client machine. However, the error is still there.

Which error?

In my client browser, am getting message that please change time zone on appointment screen.

-prapa

Which version of the reference application are you running?

As i mentioned before, latest version of docker image. openmrs/openmrs-reference-application-distro:demo.

Thanks Prapa

did you see this?

Yes, Both time zone are same, but message is still showing to UTC. it is only working after changing UTC.Am in Center time zone.

thanks Prapa

@prapakaran can you download the latest reference application standalone version and test to see if it works?