$now = new DateTime("now");
echo $now->format("M j, Y H:i:s O")."\n";
But it doesn't work. It runs local.
Salman : if I do it, it will start at 11 here in france.
No, it will start at 11am UTC = 12 in France (UTC+1)
I tried to change the time on my computer, and it runs as it should do. But, and I don't understand why, it will run with the server time but it changes if you are in UK, FR, ou USA.. Which is dumb..
What you wrote gets "now" in the server's time but it doesn't output the timezone (+1) so the javascript interprets the time in the user's timezone.
No, it will start at 11am UTC = 12 in France (UTC+1)
What you wrote gets "now" in the server's time but it doesn't output the timezone (+1) so the javascript interprets the time in the user's timezone.