[Webkit-unassigned] [Bug 97636] New: [Forms] Move code fragment for current local time into common place
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 25 23:41:44 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=97636
Summary: [Forms] Move code fragment for current local time into
common place
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Forms
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: yosin at chromium.org
There are same code fragment in
- MonthInputType::defaultValueForStepUp() http://trac.webkit.org/browser/trunk/Source/WebCore/html/MonthInputType.cpp#L88
- TimeInputType::defaultValueForStepUp() http://trac.webkit.org/browser/trunk/Source/WebCore/html/TimeInputType.cpp#L79
Note: We should have defaultValueForStepUp() for DateTimeLocalInputType and WeekInputType.
We should have function to calculate local current time, currentLocalTimeMs().
double current = currentTimeMS();
double utcOffset = calculateUTCOffset();
double dstOffset = calculateDSTOffset(current, utcOffset);
int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
current += offset * msPerMinute;
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list