Search code examples
phpmysqlamazon-web-servicesdatetimewindows-server-2012-r2

How to manage date time in order management system like foodpanda


I am facing issue in managing date and time in order management system after midnight. Restaurant are showing open after 12AM. Please suggest the proper way to manage this issue.

I am using windows server 2012 in Amazon web services and apache and mysql. The site is developed in php.


Solution

  • I don't think it has anything to do with technologies or platform you are using. It is an application issue. Few things you need to take care:

    1. Install services like ntp which keeps time in sync of the server. But this is to make sure time is synced upto micro seconds. This is not an issue in ur case for now.

    2. I think problem in your case is timezone.. which can be solved in multiple ways. Easiest solution would be to make sure that your database and server ( on which php ) is running are in same time zone as that of your country.. i.e. if your cusstomers/restaurants are from India; make sure your database and PHP server are on IST.. Then you don't have to worry about timezone issues.. but then this won't work if your customers are distributed in multiple countries. In that case, in your application you would always have to convert time to same timezone viz. IST.