Bug 83164 - Add WTF::getCurrentLocalTime()
Summary: Add WTF::getCurrentLocalTime()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Patrick R. Gansterer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-04 08:06 PDT by Patrick R. Gansterer
Modified: 2012-04-04 23:40 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.09 KB, patch)
2012-04-04 08:11 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff
Patch (7.28 KB, patch)
2012-04-04 10:35 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff
Patch (8.32 KB, patch)
2012-04-04 11:31 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff
Patch (9.39 KB, patch)
2012-04-04 14:01 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2012-04-04 08:06:32 PDT
Add WTF::getCurrentLocalTime()
Comment 1 Patrick R. Gansterer 2012-04-04 08:11:48 PDT
Created attachment 135593 [details]
Patch
Comment 2 Alexey Proskuryakov 2012-04-04 09:51:08 PDT
Comment on attachment 135593 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=135593&action=review

> Source/WTF/ChangeLog:13
> +        (WTF):

Please always remove useless gunk like this.

> Source/WTF/wtf/CurrentTime.h:61
> +inline void getCurrentLocalTime(struct tm* localTM)

Why does this need to be inline? It most likely shouldn't be.

> Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp:148
> +    String dateString = makeRFC2822DateString(localTM.tm_wday, localTM.tm_mday, localTM.tm_mon, 1900 + localTM.tm_year, localTM.tm_hour, localTM.tm_min, localTM.tm_sec, calculateUTCOffset() / (1000 * 60));

It's not great that conversion to local time and time zone offset calculation are separate steps, subject to race condition. But not new to this patch, and not very likely to occur in practice.
Comment 3 Patrick R. Gansterer 2012-04-04 10:35:14 PDT
Created attachment 135622 [details]
Patch
Comment 4 Build Bot 2012-04-04 11:03:43 PDT
Comment on attachment 135622 [details]
Patch

Attachment 135622 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/12323882
Comment 5 Patrick R. Gansterer 2012-04-04 11:31:31 PDT
Created attachment 135640 [details]
Patch
Comment 6 WebKit Review Bot 2012-04-04 12:38:04 PDT
Comment on attachment 135640 [details]
Patch

Attachment 135640 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12324902
Comment 7 Patrick R. Gansterer 2012-04-04 14:01:48 PDT
Created attachment 135672 [details]
Patch
Comment 8 Patrick R. Gansterer 2012-04-04 23:40:48 PDT
Comment on attachment 135672 [details]
Patch

Clearing flags on attachment: 135672

Committed r113295: <http://trac.webkit.org/changeset/113295>
Comment 9 Patrick R. Gansterer 2012-04-04 23:40:57 PDT
All reviewed patches have been landed.  Closing bug.