summaryrefslogtreecommitdiff
path: root/absl/time
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-05-04 19:23:13 -0700
committerGravatar Andy Getz <durandal@google.com>2021-05-05 11:06:54 -0400
commit037ade20d1132781aae3cda4d547a9e6a5f557bf (patch)
tree3843223c0a157cd25cc5612718b4dcfb83b34cd7 /absl/time
parentcba8cf87bcaac32e90a366fa16216ee89f7f61cc (diff)
Export of internal Abseil changes
-- d8a1e7f8059a0bc4cd72b4e4ca2947322c36f7ee by Martijn Vels <mvels@google.com>: Add cordz allowlist and cleanup COPTS PiperOrigin-RevId: 372042499 -- 2abd20ac17127b8823787bfcdd3e7e80709d3034 by Evan Brown <ezb@google.com>: Remove unnecessary string conversion now that FormatTime accepts string_view. PiperOrigin-RevId: 371989142 GitOrigin-RevId: d8a1e7f8059a0bc4cd72b4e4ca2947322c36f7ee Change-Id: I637e9fa434de9b2c38fd0f96d66eefc6e8eec8e8
Diffstat (limited to 'absl/time')
-rw-r--r--absl/time/civil_time.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/absl/time/civil_time.cc b/absl/time/civil_time.cc
index bdfe9ce0..6a231edb 100644
--- a/absl/time/civil_time.cc
+++ b/absl/time/civil_time.cc
@@ -38,9 +38,7 @@ std::string FormatYearAnd(string_view fmt, CivilSecond cs) {
const CivilSecond ncs(NormalizeYear(cs.year()), cs.month(), cs.day(),
cs.hour(), cs.minute(), cs.second());
const TimeZone utc = UTCTimeZone();
- // TODO(absl-team): Avoid conversion of fmt string.
- return StrCat(cs.year(),
- FormatTime(std::string(fmt), FromCivil(ncs, utc), utc));
+ return StrCat(cs.year(), FormatTime(fmt, FromCivil(ncs, utc), utc));
}
template <typename CivilT>