开发者

How do i manage Date System in Hotel Reservation System

开发者 https://www.devze.com 2023-03-14 02:56 出处:网络
I am starting on Hotel reservation System. Before starting i came with confusion of date system. I am planning it f开发者_JS百科or intranet system. I am concerned about tracking change of date in serv

I am starting on Hotel reservation System. Before starting i came with confusion of date system. I am planning it f开发者_JS百科or intranet system. I am concerned about tracking change of date in server system.

Lets suppose we are running our system smoothly. Our day to day schedules are being fine. What happens if someone changes date back in our system and too ahead ie. changes the date and time in the our intranet server.

How should our system react to such changes? Should it ignore the changes and run as it is and calculate the things as same?


If someone is changing your server date they are likely to be only changing it to correct it for minor accuracy errors. (+/- 20 minutes at most). Windows will even do it for you.

However, for a hotel reservation system you shouldn't be worried about minute by minute transactions - you want to know how many rooms are booked for the day not the hour (well maybe some hotels!!)

Instead think of your main timestamps as day only (for days stay, book in date etc) and for everything else rely on something sequential, such as an incrementing unique id to show the true order of transactions.


You store the reservation as a desired (or target) time, and the amount of time they are staying as a time offset (most likely in hours).

So the desired check-in time will be 19/06/2011, 13:00 hours. The offset for the time i'm staying is 24 (for 24 hours, it could be 25 if i've requested a late checkout).

In your system these times should always be recognised as guidelines - i may not turn up at 1pm (i could be several hours late), that time is simply a guideline for the hotel to have the room ready. I may turn up at 12pm but the hotel doesn't have the room ready till 3pm.

So through all this, the server time should have very little impact on anything. If the server is triggering notifications then you may get a notification early or late, but in the grand scheme of things it doesn't matter too much because you will notice the problem quickly and staff should be capable of accomodating the problem until it's fixed.

0

精彩评论

暂无评论...
验证码 换一张
取 消