I am building a simple date check script, and I just stumbled upon a big problem.

$correct_date = FALSE; if ($legal_month == $month_wozero || $legal_month == $month_wzero) { if ($legal_day == $day_wzero || $legal_day == $day_wozero) { if ($legal_year == $year) $correct_date = TRUE; } }
$ legal_day, $ legal_month, $ legal_year = user input
$ day_wozero / wzero, $ month_wozero / wzero, $ year = server time
The user must enter the date on which they placed the order. But it is clear that this will never work with the way Ive configured my script. Location of the company - 2 hours from the server. But that doesn’t matter, as someone can place an order anywhere in the United States. Therefore, if they are in New York, it may be the next day, and the business in Los Angeles, the dates will be different. It may also be the last day of the month, and the month in New York will be different from Los Angeles.
The only way that stands in my head is to build a complete set of if / else rules to adjust the time and difference at a specific time. But I'm pretty sure there should be a different way around this that I don't know about.
Any suggestions?
date timezone php forms
Sickest
source share