commit | 2e84b4aef602f500c7c9935dacee4f21c138d2d3 | [log] [tgz] |
---|---|---|
author | mukesh agrawal <quiche@chromium.org> | Thu Apr 24 15:42:47 2014 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Sat Apr 26 00:56:57 2014 +0000 |
tree | b50ba991c0f0d86a0ceec5d7e7c5513e9cdd7891 | |
parent | 132e96ff1c3dade1b08cdae82b0f4ed27a9a45d0 [diff] |
shill: time: remove dynamically generated format string Time::GetNow used to pass a format string to strftime, which would generate a string containing a format specifier for base::StringPrintf. That means that the format string can't be statically checked against its arguments. Change GetNow() to resolve this problem. While there: - Fix the format specifier for the microseconds value. (The incorrect specifier wasn't a problem in practice because microseconds will never be large enough for signed vs unsigned to matter. But since we've noticed it, let's fix it.) - Add a unit test for the time formatting used by GetNow. BUG=chromium:293668 TEST=unit tests Change-Id: I0f641b760350d10fa9fc18a4cc25ab38503c043c Reviewed-on: https://chromium-review.googlesource.com/197060 Tested-by: mukesh agrawal <quiche@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: mukesh agrawal <quiche@chromium.org>