kreut Posted March 1, 2011 Share Posted March 1, 2011 Hello! I'm trying to use Zend_Date (first time) as part of a website that will require users from different timezones to enter a date and time(some date in the future, say June 5th, 2013 10:00am). I'll store this in my MySql database and then later on use it to compare it against the current date for users in those particular timezones. Once the "future date" has passed, my program will take some action. A little help would be appreciated. Right now, I have the incredible start of date_default_timezone_set('America/Los_Angeles'): $Now_date = new Zend_date; $now_date->getTimestamp(); I THINK that the above code sets things up for any timezone. I guess I need help with the format of the "future" date that gets stored in the database and then how to compare it to the $now_date. Any help even getting started would be most appreciated. -Thank you Quote Link to comment https://forums.phpfreaks.com/topic/229321-zend-date/ Share on other sites More sharing options...
ignace Posted March 2, 2011 Share Posted March 2, 2011 $date = new Zend_Date($row['db_date']); echo $date->get('YYYY-MM-dd HH:mm:ss'); More information can be found at: http://framework.zend.com/manual/en/zend.date.html Quote Link to comment https://forums.phpfreaks.com/topic/229321-zend-date/#findComment-1181785 Share on other sites More sharing options...
kreut Posted March 2, 2011 Author Share Posted March 2, 2011 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/229321-zend-date/#findComment-1181962 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.