Why am I getting two results when using these functions…
<?php
echo strtotime("2011-9-9")."<script type='text/javascript'>alert(Date.UTC(2011, 9, 9)/1000);</script>";
?>
this gives me 1315526400 and a js alert of 1318118400.. Why are these so different!?
Also, what is the best way to take a UTC timestamp (integer) and parse it for only the year, month, and day?
Thanks
Javascript zero indexes its months, so the PHP code refers to september, but JS refers to october.
From the Chrome dev console: