summaryrefslogtreecommitdiff
path: root/absl/time/format.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/time/format.cc')
-rw-r--r--absl/time/format.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/absl/time/format.cc b/absl/time/format.cc
index 6aabcee9..6eb83d7a 100644
--- a/absl/time/format.cc
+++ b/absl/time/format.cc
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,7 +22,7 @@
namespace cctz = absl::time_internal::cctz;
namespace absl {
-inline namespace lts_2018_12_18 {
+inline namespace lts_2019_08_08 {
extern const char RFC3339_full[] = "%Y-%m-%dT%H:%M:%E*S%Ez";
extern const char RFC3339_sec[] = "%Y-%m-%dT%H:%M:%S%Ez";
@@ -68,7 +68,8 @@ absl::Time Join(const cctz_parts& parts) {
} // namespace
-std::string FormatTime(const std::string& format, absl::Time t, absl::TimeZone tz) {
+std::string FormatTime(const std::string& format, absl::Time t,
+ absl::TimeZone tz) {
if (t == absl::InfiniteFuture()) return kInfiniteFutureStr;
if (t == absl::InfinitePast()) return kInfinitePastStr;
const auto parts = Split(t);
@@ -84,15 +85,15 @@ std::string FormatTime(absl::Time t) {
return absl::FormatTime(RFC3339_full, t, absl::LocalTimeZone());
}
-bool ParseTime(const std::string& format, const std::string& input, absl::Time* time,
- std::string* err) {
+bool ParseTime(const std::string& format, const std::string& input,
+ absl::Time* time, std::string* err) {
return absl::ParseTime(format, input, absl::UTCTimeZone(), time, err);
}
// If the input string does not contain an explicit UTC offset, interpret
// the fields with respect to the given TimeZone.
-bool ParseTime(const std::string& format, const std::string& input, absl::TimeZone tz,
- absl::Time* time, std::string* err) {
+bool ParseTime(const std::string& format, const std::string& input,
+ absl::TimeZone tz, absl::Time* time, std::string* err) {
const char* data = input.c_str();
while (std::isspace(*data)) ++data;
@@ -137,5 +138,5 @@ std::string UnparseFlag(absl::Time t) {
return absl::FormatTime(RFC3339_full, t, absl::UTCTimeZone());
}
-} // inline namespace lts_2018_12_18
+} // inline namespace lts_2019_08_08
} // namespace absl