dadamssg87 Posted September 11, 2012 Share Posted September 11, 2012 Let's say i have a timestamp stored in my database. I also have a form that user's can input a time and a timezone offset(-5, -4, -3, etc.). How would i check if the user inputted a time that is greater than the timestamp? Quote Link to comment https://forums.phpfreaks.com/topic/268246-timestamp-and-timezones/ Share on other sites More sharing options...
KevinM1 Posted September 11, 2012 Share Posted September 11, 2012 Let's say i have a timestamp stored in my database. I also have a form that user's can input a time and a timezone offset(-5, -4, -3, etc.). How would i check if the user inputted a time that is greater than the timestamp? If you're using PHP 5.3+, you can use the new DateTime functionality. It works both procedurally and in OOP. http://www.php.net/manual/en/datetime.construct.php http://www.php.net/manual/en/datetime.gettimestamp.php Quote Link to comment https://forums.phpfreaks.com/topic/268246-timestamp-and-timezones/#findComment-1376897 Share on other sites More sharing options...
dadamssg87 Posted September 11, 2012 Author Share Posted September 11, 2012 sweet thanks! Quote Link to comment https://forums.phpfreaks.com/topic/268246-timestamp-and-timezones/#findComment-1376916 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.