jcbarr Posted November 3, 2006 Share Posted November 3, 2006 Okay I know how to set the default date timezone and echo the date and all of that, but I am having some issues with comparing the current date with a deadline that I have set.I want a variable to have a different value depending on what date and time it is currently...So basically I want to do something like;if the current date and time is greater than November 3rd 11:59pm 2006 then variable is equal to...Hope that makes sense...Thanks for the help everyone. Link to comment https://forums.phpfreaks.com/topic/26060-solved-date-triggered-event/ Share on other sites More sharing options...
Orio Posted November 3, 2006 Share Posted November 3, 2006 You'll find [url=http://www.php.net/strtotime]strtotime()[/url] useful for comparing dates :)Orio. Link to comment https://forums.phpfreaks.com/topic/26060-solved-date-triggered-event/#findComment-119250 Share on other sites More sharing options...
jcbarr Posted November 3, 2006 Author Share Posted November 3, 2006 Solved it. It was easier than I thought since the deadline that I was setting was 11:59pm, so as soon as it tickes over to the next day. Just convert the deadline day to seconds and then comapre that with the current time.Pretty simple, thanks for pointing me to that manual page. It will help in the future I am sure. Link to comment https://forums.phpfreaks.com/topic/26060-solved-date-triggered-event/#findComment-119356 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.