Summary: | Date() constructor treats time as UTC instead of localtime | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Wolfgang Bauer <wbauer1> |
Component: | kjs | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.13.1 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kjs/198c1819e382aed93a574c6f9d51c7303985a672 | Version Fixed In: | 4.13.3 |
Sentry Crash Report: | |||
Attachments: | html file demonstrating the issue |
Description
Wolfgang Bauer
2014-05-29 20:32:06 UTC
Created attachment 86908 [details]
html file demonstrating the issue
This actually worked fine until 4.9.1 and broke in 4.9.2. I was able to track it down to this commit: https://projects.kde.org/projects/kde/kdelibs/repository/revisions/48dd1fc50277b861b49613c5f46b6f8b10cc932d See https://git.reviewboard.kde.org/r/118947/ for a proposed fix. Git commit 0137c691cfe02e6fc0c99e2ced15aea149e56b4b by Wolfgang Bauer. Committed on 26/06/2014 at 11:55. Pushed by wbauer into branch 'KDE/4.13'. KJS: treat time correctly as localtime in the Date() constructor Commit 48dd1fc50277b861b49613c5f46b6f8b10cc932d introduced a bug: It factors out the code to convert a time specification to an actual time value into the function makeTimeFromList(). But in that function makeTime(&t, ms, true) is called, whereas the original code called makeTime(&t, ms, false) for the constructor. This patch fixes it by passing the "utc" parameter to makeTime() instead of "true". FIXED-IN: 3.13.3 REVIEW: 118947 M +1 -1 kjs/date_object.cpp http://commits.kde.org/kdelibs/0137c691cfe02e6fc0c99e2ced15aea149e56b4b Git commit 786e0a7821f195c5a227e72a41d29033851dc2af by Wolfgang Bauer. Committed on 26/06/2014 at 11:55. Pushed by wbauer into branch 'master'. KJS: treat time correctly as localtime in the Date() constructor Commit 48dd1fc50277b861b49613c5f46b6f8b10cc932d introduced a bug: It factors out the code to convert a time specification to an actual time value into the function makeTimeFromList(). But in that function makeTime(&t, ms, true) is called, whereas the original code called makeTime(&t, ms, false) for the constructor. This patch fixes it by passing the "utc" parameter to makeTime() instead of "true". FIXED-IN: 3.13.3 REVIEW: 118947 (cherry picked from commit 0137c691cfe02e6fc0c99e2ced15aea149e56b4b) M +1 -1 kjs/date_object.cpp http://commits.kde.org/kdelibs/786e0a7821f195c5a227e72a41d29033851dc2af Git commit 198c1819e382aed93a574c6f9d51c7303985a672 by Wolfgang Bauer. Committed on 26/06/2014 at 12:21. Pushed by wbauer into branch 'master'. treat specified time correctly as localtime in the Date() constructor Commit 48dd1fc50277b861b49613c5f46b6f8b10cc932d (in KDE4's kdelibs) introduced a bug: It factors out the code to convert a time specification to an actual time value into the function makeTimeFromList(). But in that function makeTime(&t, ms, true) is called, whereas the original code called makeTime(&t, ms, false) for the constructor. This patch fixes it by passing the "utc" parameter to makeTime() instead of "true". FIXED-IN: 3.13.3 REVIEW: 118947 M +1 -1 src/kjs/date_object.cpp http://commits.kde.org/kjs/198c1819e382aed93a574c6f9d51c7303985a672 |