Working on a little Christmas countdown and I have the following php:
$today = getdate();
$xmas=$today[year]."-12-25";
$datetime2 = new DateTime("$xmas");
$datetime1 = new DateTime();
$interval = $datetime1->diff($datetime2);
$untilxmas=$interval->format('%a');
As I tested it, I realized that the answers were based on my server's timezone. I have access to a variable with the visitors offset from GMT, so what would I need to do to make it so my script would have a different answer for someone in New York vs. Vancouver?
Thanks!