[Bug 11069] document.lastModified could use strict ISO 8601

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11069

--- Comment #3 from John Drinkwater <john@nextraweb.com> 2010-10-17 01:36:32 UTC ---
(In reply to comment #1)
> Only IE8 is aligned with the specification.

Karl, read your blog and had seen the posts in 2007 about it, surprised at how
the spec was defined.
All stable (released) browsers have wildly different responses, yet Editor has
standardised on one of those formats.

Seems if the argument is to avoid breaking things, we already have a pile of
breakage in previous browsers, so.. why should that stop a little more.

I fear its probably too late to change things as Firefox 4 beta meets this spec
and as comment #2 mentions WebKit too. But should they meet the current spec?

This post seemed to have a reasonable solution, having it be a Date variable
http://lists.w3.org/Archives/Public/public-html/2007Jun/0997.html

> So how about:
>  * changing document.lastModified to a Date (or DOMTimeStamp)
>  * requiring that in ECMAScript bindings, toString() uses the
> "MM/dd/yyyy HH:mm:ss" format (I know ECMAScript says the format is
> implementation-dependent, but why couldn't we enforce it when used in
> HTML?)

The other suggestion (assuming corrected re: this bug) would be best served by
a Date.toISOString method, but that is not relevant here.


(In reply to comment #1)
> "If the last modification date and time are not known, the attribute must
> return the current date and time in the above format."

If you have a long-running web application, how shall it know if the resource
is genuinely that old or whether the date couldn’t be inferred? Seems Opera’s
behaviour
is more sensible, defaulting to Epoch.

## 

(In reply to comment #1)
> Note that in addition of W3C Date and Time formats, there is the issue of the
> time zone. so far Opera and WebKit give the time zone of the resource *on the
> server*, but Firefox and IE give the date in the time zone of the user agent

IMO, keeping the timezone would be a safer option - you can’t know if it may be
useful in the future. Date can easily localise timezones so, win.

##

(In reply to comment #2)
Adam,
 obviously you’ve just written something i’m asking to have changed.. am I
making sense, would it be worth it?

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Sunday, 17 October 2010 01:36:36 UTC