WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
97636
[Forms] Move code fragment for current local time into common place
https://bugs.webkit.org/show_bug.cgi?id=97636
Summary
[Forms] Move code fragment for current local time into common place
yosin
Reported
2012-09-25 23:42:11 PDT
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;
Attachments
Add attachment
proposed patch, testcase, etc.
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