I would like to know how to handle date and time if we do any site where we ask users to create evetns like evite.com. my confusion is, if I create an event for Aug 5th and then invite 200 persons from different places(outside the event country), how evite sends the reminder because the time is different in some countries i.e. it will be still 4th in some country but 5th in some countries. Also, when we do any time calcualtion it takes the servers time where the site is hosted, is this the right way and just leave it like that?
please throw some light.
regards
The server time is useless.
For future events, you have to store both the time of the event in the form “yyyy-mm-dd hh:mm:ss” and the timezone of the event (e.g. “Europe/Lisbon”). Do not store the timestamp and the timezone unless it’s some kind of astronomical event whose time depends not on the legal time of the country/region where the event happens but on some absolute time point.
Then, you can calculate the time of the event like this (e.g.):
Further reading: Storing Date/Times in Databases