WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
149092
document.lastModified should use the user's local time zone
https://bugs.webkit.org/show_bug.cgi?id=149092
Summary
document.lastModified should use the user's local time zone
Chris Dumez
Reported
2015-09-12 12:06:39 PDT
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).
Attachments
Patch
(8.81 KB, patch)
2015-09-12 12:37 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(10.00 KB, patch)
2015-09-12 22:09 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(9.60 KB, patch)
2015-09-13 21:17 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2015-09-12 12:07:02 PDT
rdar://problem/22567705
Chris Dumez
Comment 2
2015-09-12 12:37:27 PDT
Created
attachment 261062
[details]
Patch
Alexey Proskuryakov
Comment 3
2015-09-12 20:07:52 PDT
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?
Chris Dumez
Comment 4
2015-09-12 20:13:08 PDT
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.
Chris Dumez
Comment 5
2015-09-12 22:09:55 PDT
Created
attachment 261075
[details]
Patch
Chris Dumez
Comment 6
2015-09-12 22:10:17 PDT
(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.
Daniel Bates
Comment 7
2015-09-13 16:46:11 PDT
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.
Daniel Bates
Comment 8
2015-09-13 16:46:11 PDT
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.
Chris Dumez
Comment 9
2015-09-13 16:56:30 PDT
(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.
Ryosuke Niwa
Comment 10
2015-09-13 21:07:49 PDT
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.
Chris Dumez
Comment 11
2015-09-13 21:17:40 PDT
Created
attachment 261098
[details]
Patch
Chris Dumez
Comment 12
2015-09-13 21:18:30 PDT
Comment on
attachment 261098
[details]
Patch Clearing flags on attachment: 261098 Committed
r189679
: <
http://trac.webkit.org/changeset/189679
>
Chris Dumez
Comment 13
2015-09-13 21:18:36 PDT
All reviewed patches have been landed. Closing bug.
Alexey Proskuryakov
Comment 14
2017-11-07 11:14:58 PST
***
Bug 4363
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug