Closed Bug 7658 Opened 25 years ago Closed 25 years ago

document.lastModified returns wrong date.

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: martin.honnen, Assigned: vidur)

Details

(Whiteboard: [Testcase]document.lastModified returns January 1, 1970 GMT)

Any reference to document.lastModified seems to stop script execution. For instance <HTML> <HEAD> </HEAD> <BODY onload="alert(document.lastModified); alert('kibology');"> </BODY> </HTML> doesn't show. Haven't tried whether document.writing lastModified still works. Happens with m6 build on win95. It is rather nasty as it just stops any script using it from running any further than to the document.lastModified access.
document.writing document.lastModified is broken too but HTML content after <SCRIPT> document.write(document.lastModified); </SCRIPT> shows
Status: NEW → ASSIGNED
Target Milestone: M9
I believe the script returns an error since document.lastModified isn't implemented. It will be done....
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed on 8/9/1999.
Status: RESOLVED → REOPENED
Summary: accessing document.lastModified stops script execution → document.lastModified return wrong date.
Whiteboard: [Testcase]document.lastModified returns January 1, 1970 GMT
Resolution: FIXED → ---
The previous summary of this bug was "accessing document.lastModified stops script execution" and now I'm reopening this bug with new summary. BUILD: 08-10-09. [Apprunner/Viewer] STEPS TO REPRODUCE: 1] Please copy the code I'm providing. Save it as HTML file. 2] Open this HTML file with apprunner as well as viewer. 3] You'll see one text box [Which is Result Text box]. and you'll see one button "Acess LastModified". 4] Click this button. EXPECTED RESULTS: Result text box should show date when the HTML file was modified last. In your case it should be the date you create that file. For example, I created this file today, so it should show something like "08/10/99 14:13:40". ACTUAL RESULTS: Result text box shows 30 years back date. Currently document.lastModified is returning "January 1, 1970 GMT". CODE: <HTML> <HEAD> </HEAD> <BODY > <script> <!-- function getlastmod(){ document.inForm.result.value=document.lastModified; } //--> </script> <form name="inForm"> Result Text Box: <input type="text" name="result" size="30" value=""> <br> <input type="button" value="Access LastModified" onclick="getlastmod();"> </form> </BODY> </HTML> END OF CODE:
Summary: document.lastModified return wrong date. → document.lastModified returns wrong date.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → INVALID
document.lastModified returns the value in the HTTP last-modified header. If none exists, it returns "January 1, 1970 GMT". This won't work for file: URLs.
Status: RESOLVED → VERIFIED
Oh OK, Sorry Vidur. I didn't knew about it. Yeah its working fine with HTTP Protocol. Marking verified.
You need to log in before you can comment on or make changes to this bug.