Logical1 Posted May 15, 2009 Share Posted May 15, 2009 Howdy I am trying to find a way to standardize time of recorded events on my site. People post questions at different time zones and I want everybody's posting time to be based on a uniform system. And then I need to do some calculations with time (FOR EXAMPLE : 2 hours after posting the person should not be able to edit). Any idea as how to go about this? Thanks in advance. L1 Quote Link to comment Share on other sites More sharing options...
ldougherty Posted May 15, 2009 Share Posted May 15, 2009 You should just store the datestamp values in your database based off of the server time. If you need to display these datestamps anywhere on your site you could have a user option of timezone much like forums do which will adjust the date pulled from the database for timezone. As for not being able to edit after 2 hours, you will just need to have the system do a check of the current datestamp vs the stored datestamp and compare the two values to determine the difference. If the difference is greater than 2 hours then do not allow the function to run. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.