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

Unified Diff: third_party/zlib/google/zip_reader.cc

Issue 2091673002: Make callers of FromUTC(Local)Exploded in third_party/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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
« no previous file with comments | « no previous file | third_party/zlib/google/zip_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/zip_reader.cc
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc
index a962fa10d7cf5db9663d008914ff0b096ca09d17..b21b243a9baaf513003f222497205840756ecc48 100644
--- a/third_party/zlib/google/zip_reader.cc
+++ b/third_party/zlib/google/zip_reader.cc
@@ -166,12 +166,9 @@ ZipReader::EntryInfo::EntryInfo(const std::string& file_name_in_zip,
exploded_time.minute = raw_file_info.tmu_date.tm_min;
exploded_time.second = raw_file_info.tmu_date.tm_sec;
exploded_time.millisecond = 0;
- if (exploded_time.HasValidValues()) {
- last_modified_ = base::Time::FromLocalExploded(exploded_time);
- } else {
- // Use Unix time epoch if the time stamp data is invalid.
+
+ if (!base::Time::FromLocalExploded(exploded_time, &last_modified_))
last_modified_ = base::Time::UnixEpoch();
- }
}
ZipReader::ZipReader()
« no previous file with comments | « no previous file | third_party/zlib/google/zip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698