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

Unified Diff: base/time/time.cc

Issue 1988663002: Add: check exploded time is properly converted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handling local and utc times + unittests Created 4 years, 7 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
Index: base/time/time.cc
diff --git a/base/time/time.cc b/base/time/time.cc
index 76ffeb744112d1909afa9b488bcfa277950225bb..5475141be3f2680ff2275c7d09a22bc5cb0bab01 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -344,4 +344,10 @@ bool Time::Exploded::HasValidValues() const {
is_in_range(millisecond, 0, 999);
}
+bool Time::Exploded::operator!=(const Exploded& rhs) {
+ return (month != rhs.month || day_of_month != rhs.day_of_month ||
Mark Mentovai 2016/05/18 17:42:49 year?
maksims (do not use this acc) 2016/05/19 09:57:19 Done.
+ hour != rhs.hour || minute != rhs.minute || second != rhs.second ||
+ millisecond != rhs.millisecond);
Mark Mentovai 2016/05/18 17:42:49 The outer (parentheses) surround the entire expres
maksims (do not use this acc) 2016/05/19 09:57:19 Done.
+}
+
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698