Forum Moderators: open
<script language="Javascript">
<!--
document.write("The page that contains this example was last updated on: "+document.lastModified+"")
-->
</script>
Does the page with the error use any serverside scripting? If so then JavaScript will (correctly) send the time the file was rendered.
The solution is to use the serverside language you're using to achieve this instead, though I'm not sure what language that is.
Let me know what language and I'll try to help you out.
John
Internet Explorer takes the null value, uses it as-is in the "new Date()" function, and gets back the CURRENT date and time. This makes it appear that the page was updated just seconds ago. If you don't look too closely, this seems to be correct, and you're happy with what you see.
Netscape takes the null value, forces it to numeric, gets a zero at this point, uses that zero in the "new Date()" function, and gets back the first midnight of January 1st in 1970. It then applies the timezone offset value to give a proper answer based on the user's machine. For me, in the eastern USA, this displays as 7:00pm on December 31 of 1969.
WebTV functions similarly to Netscape, but does the timezone offset earlier in the procedure. This results in a negative value to the "new Date()" function and causes an error.
I've not checked Opera, but it seems to be following the Netscape pattern.