Closed
Bug 107445
Opened 24 years ago
Closed 15 years ago
document.lastModified should read UTC rather than GMT
Categories
(Core :: DOM: Core & HTML, defect)
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.
![]() |
||
Comment 1•24 years ago
|
||
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
Updated•24 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•24 years ago
|
||
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.
Comment 4•24 years ago
|
||
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
Comment 6•22 years ago
|
||
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
Comment 7•22 years ago
|
||
see also bug 224744.
Comment 8•20 years ago
|
||
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.
Updated•16 years ago
|
Assignee: general → nobody
QA Contact: amar → general
Comment 9•15 years ago
|
||
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.
Description
•