I would like to display certain text per the user's time. For instance, in the morning the text would say "Good Morning", after noon would say "Good Afternoon", after six would output "Good Evening" and so on.
You can only do it if you somehow get information from the user indicating what his/her local time zone is. This could be part of the user registration process if, in fact, users must register. Otherwise you would have to either use some JavaScript to get the local time info and let your script know somehow (AJAX?) or use some sort of IP-to-location database to make a best guess as to the user's location and time zone.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks