The prosecution of software programmer Aaron Swartz exposes the poorly written, anachronistic laws governing a range of computer use.
posted @ 07:50 AM EST
The following code in a PHP file shows the date and time that a web page was loaded, displaying the server’s time in the client’s time zone.
<script type=“text/javascript”>
document.write(new Date(<?php echo time(); ?>*1000));
</script>
The UTC time in seconds, returned by the PHP time function, is inserted into the expression which is the argument to the JavaScript Date constructor, the UTC time in milliseconds. The default conversion of a Date to a string, invoked by write, is expressed in the local time zone.
posted @ 01:32 PM EST