Summary: | [WIN] Use GetTimeZoneInformation() for getting the timezone name | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Patrick R. Gansterer <paroga> | ||||||
Component: | JavaScriptCore | Assignee: | Patrick R. Gansterer <paroga> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aroben, bfulgham, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Bug Depends on: | 92282 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Patrick R. Gansterer
2012-07-22 01:18:40 PDT
Created attachment 153686 [details]
Patch
Comment on attachment 153686 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153686&action=review > Source/JavaScriptCore/runtime/DateConversion.cpp:93 > + DWORD result = GetTimeZoneInformation(&timeZoneInformation); I would have named this variable daylightType instead. > Source/JavaScriptCore/runtime/DateConversion.cpp:94 > + CString timeZoneNameString = String(result == TIME_ZONE_ID_DAYLIGHT ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName).latin1(); It's unfortunate that we have to convert WCHAR to char here. I would use ascii().data() instead possibly allocating String as a local variable. Comment on attachment 153686 [details]
Patch
Okay, I withdraw my r+. We need to be more careful here. I thought DaylightName could only be 3-letter abbreviations but this apparently isn't the case. It could be a full long timezone name.
Created attachment 156901 [details]
Patch
Comment on attachment 156901 [details]
Patch
This is more like it!
Comment on attachment 156901 [details] Patch Clearing flags on attachment: 156901 Committed r125004: <http://trac.webkit.org/changeset/125004> All reviewed patches have been landed. Closing bug. |