Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
document.write("The page that contains this example was last updated on: "+document.lastModified+"")
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.
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.