mirror of
https://github.com/alibaba/higress.git
synced 2026-02-06 23:21:08 +08:00
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
diff --git a/absl/time/internal/cctz/src/time_zone_format.cc b/absl/time/internal/cctz/src/time_zone_format.cc
|
|
index d8cb047..0c5f182 100644
|
|
--- a/absl/time/internal/cctz/src/time_zone_format.cc
|
|
+++ b/absl/time/internal/cctz/src/time_zone_format.cc
|
|
@@ -18,6 +18,8 @@
|
|
#endif
|
|
#endif
|
|
|
|
+#define HAS_STRPTIME 0
|
|
+
|
|
#if defined(HAS_STRPTIME) && HAS_STRPTIME
|
|
#if !defined(_XOPEN_SOURCE)
|
|
#define _XOPEN_SOURCE // Definedness suffices for strptime.
|
|
@@ -58,7 +60,7 @@ namespace {
|
|
|
|
#if !HAS_STRPTIME
|
|
// Build a strptime() using C++11's std::get_time().
|
|
-char* strptime(const char* s, const char* fmt, std::tm* tm) {
|
|
+char* strptime_local(const char* s, const char* fmt, std::tm* tm) {
|
|
std::istringstream input(s);
|
|
input >> std::get_time(tm, fmt);
|
|
if (input.fail()) return nullptr;
|
|
@@ -648,7 +650,7 @@ const char* ParseSubSeconds(const char* dp, detail::femtoseconds* subseconds) {
|
|
// Parses a string into a std::tm using strptime(3).
|
|
const char* ParseTM(const char* dp, const char* fmt, std::tm* tm) {
|
|
if (dp != nullptr) {
|
|
- dp = strptime(dp, fmt, tm);
|
|
+ dp = strptime_local(dp, fmt, tm);
|
|
}
|
|
return dp;
|
|
}
|