I'm trying to synchronize the timezone between a PHP script and some JavaScript code.
I want a PHP function that returns a timestamp in UTC. Does gmmktime() do that?
On the JavaScript side, I have:
var real_date = new Date();
real_date -= real_date.getTimezoneOffset() * 60000;
real_date /= 1000;
Does this convert the timestamp to UTC?