Closed Bug 107445 Opened 23 years ago Closed 15 years ago

document.lastModified should read UTC rather than GMT

Categories

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

PowerPC
macOS
defect
Not set
trivial

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: joel, Unassigned)

Details

Current builds of Mozilla display the result of document.write(document.lastModified) in the form Mon, 1 Jan 2001 00:00:01 GMT However, the terms "GMT" and "Greenwich Mean Time" are historical terms no longer used by the International Bureau of Weights and Measures. (In fact, the use of Greenwich Mean Time to determine standard world time was abolished in 1972.) Rather, we should use the standard terms "UTC" or "Coordinated Universal Time"; so the output of the Javascript line above should read Mon, 1 Jan 2001 00:00:01 UTC In fact, any other Javascript commands that display times and dates in GMT should be changed to UTC.
document.lastModified is set by the _server_, not the client. We do not generate it in any way; we just use the date the server gives us. This is the correct and expected behavior. Over to DOM0, but I believe this is invalid.
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → amar
Status: UNCONFIRMED → NEW
Ever confirmed: true
What does IE do in such a case?
Here are some sample results. The web page used as the guinea pig was last modified Monday October 29, 17:37:10 ET/22:37:10 UTC. The server on the page is Apache/1.3.9. On the Macintosh... IE 5.0: Mon Oct 29 17:37:10 2001 NS 4.78: Oct 29 22:37:10 2001 M0.9.5+: Mon, 29 Oct 2001 22:37:10 GMT Curiously, on our RS/6000 machine: NS4.77: Mon Oct 29 17:37:10 2001 so while the actual date and time depends on the server, the output varies on the actual browser.
Well, we only copy the responce header "last-modified" from the http connection to the property document.lastModified, we do no parsing or formatting of the date, at least not in the DOM code. Regardless of when the term GMT was abolished it's a well-known term, and it's used all over. It might be wrong, but us using that term for now doesn't stop the world from spinning, so I'm futuring this for now.
Target Milestone: --- → Future
OS: Mac System 9.x → MacOS X
Mass-reassigning bugs to dom_bugs@netscape.com
Assignee: jst → dom_bugs
See also the discussion in bug 224703. We're proxying the header that's transmitted by the server, while IE seems to parse the header, and then write it out using its own local conventions. Note that the server has to use GMT, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3
see also bug 224744.
Bug 99224 will modify the behaviour. In order to match IE, we're now using "MM/DD/YYYY hh:mm:ss", which avoids this issue.
Assignee: general → nobody
QA Contact: amar → general
Due to bug 99224, this is no longer an issue.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.