Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: net/cert/x509_cert_types.cc

Issue 2090713003: Make callers of FromUTC(Local)Exploded in net/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert ftp_util Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/cert/x509_cert_types.cc
diff --git a/net/cert/x509_cert_types.cc b/net/cert/x509_cert_types.cc
index e2ffb3d1b05ab829423360f7b9613e71e042a7bd..08d89bcae74545095c19104ba7f8a77d8e65a15b 100644
--- a/net/cert/x509_cert_types.cc
+++ b/net/cert/x509_cert_types.cc
@@ -76,8 +76,9 @@ bool ParseCertificateDate(const base::StringPiece& raw_date,
if (!valid)
return false;
- *time = base::Time::FromUTCExploded(exploded);
- return true;
+ // FromUTCExploded() can fail even though exploded.HasValidValues()
+ // returned true.
+ return base::Time::FromUTCExploded(exploded, time);
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698