document.lastModified should use the user's local time zone: https://html.spec.whatwg.org/multipage/dom.html#dom-document-lastmodified Chrome and Firefox comply with the specification. However, it looks like WebKit returns UTC (7 hours difference on my machine).
rdar://problem/22567705
Created attachment 261062 [details] Patch
Comment on attachment 261062 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=261062&action=review > LayoutTests/http/tests/misc/last-modified-parsing-expected.txt:6 > +11/20/2008 17:03:33 What will happen with this test if my time zone is not PST?
Comment on attachment 261062 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=261062&action=review >> LayoutTests/http/tests/misc/last-modified-parsing-expected.txt:6 >> +11/20/2008 17:03:33 > > What will happen with this test if my time zone is not PST? Good point. I should probably edit the test so that it prints UTC time.
Created attachment 261075 [details] Patch
(In reply to comment #3) > Comment on attachment 261062 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=261062&action=review > > > LayoutTests/http/tests/misc/last-modified-parsing-expected.txt:6 > > +11/20/2008 17:03:33 > > What will happen with this test if my time zone is not PST? This is addressed in the latest iteration of the patch.
Comment on attachment 261075 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=261075&action=review > Source/WebCore/ChangeLog:17 > + No new tests, already covered by existing tests. > + Do we have any tests/infrastructure to check the correctness of document.lastModified with respect to different time zones? If not, then I suggest that we add infrastructure to support changing to a time zone t at runtime and tests to ensure that document.lastModified is correct with respect t.
(In reply to comment #8) > Comment on attachment 261075 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=261075&action=review > > > Source/WebCore/ChangeLog:17 > > + No new tests, already covered by existing tests. > > + > > Do we have any tests/infrastructure to check the correctness of > document.lastModified with respect to different time zones? If not, then I > suggest that we add infrastructure to support changing to a time zone t at > runtime and tests to ensure that document.lastModified is correct with > respect t. I don't believe we currently have test infrastructure for changing the system's timezone. While this would potentially be a nice thing to have, I don't believe this is a pre-requirement for this patch though. The existing W3C tests check that document.lastModified is using the current system timezone. They used to fail for every timezone other than UTC and now they pass.
Comment on attachment 261075 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=261075&action=review >>>> Source/WebCore/ChangeLog:17 >>>> + >>> >>> Do we have any tests/infrastructure to check the correctness of document.lastModified with respect to different time zones? If not, then I suggest that we add infrastructure to support changing to a time zone t at runtime and tests to ensure that document.lastModified is correct with respect t. >> >> Do we have any tests/infrastructure to check the correctness of document.lastModified with respect to different time zones? If not, then I suggest that we add infrastructure to support changing to a time zone t at runtime and tests to ensure that document.lastModified is correct with respect t. > > I don't believe we currently have test infrastructure for changing the system's timezone. While this would potentially be a nice thing to have, I don't believe this is a pre-requirement for this patch though. The existing W3C tests check that document.lastModified is using the current system timezone. They used to fail for every timezone other than UTC and now they pass. I don't think changing the system clock's timezone is a realistic solution since we parallelize tests. In any case, I don't think we should block this patch for adding such a test infrastructure. > LayoutTests/ChangeLog:15 > +2015-09-12 Chris Dumez <cdumez@apple.com> Duplicated change log entries.
Created attachment 261098 [details] Patch
Comment on attachment 261098 [details] Patch Clearing flags on attachment: 261098 Committed r189679: <http://trac.webkit.org/changeset/189679>
All reviewed patches have been landed. Closing bug.
*** Bug 4363 has been marked as a duplicate of this bug. ***