One of the things most developers face is dealing with time calculations and logging. In this lesson we play around with the DateTime class and see how useful it can be.
We have already seen how we can use the DateTime class in PHP. In this challenge you need to check the time of day and then present an appropriate message.
You may have often wondered why times on some webpages seem to be incorrect. The most common ones I come across are on forums where the local time and server time are different and the user (usually me!) has not set their preferences correctly.
Probably one of the most useful time/date related functions in PHP is strtotime(). In this lesson I will show you some of the basic uses for this incredibly useful function.