aboutsummaryrefslogtreecommitdiff
path: root/third_party/chromium/base/time/time.cc
diff options
context:
space:
mode:
authorLuis Hector Chavez <lhchavez@google.com>2016-07-22 19:44:05 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-07-22 19:44:05 +0000
commit2c02e87003d7aa12fb2e33e99dd0208d875485bd (patch)
tree3e85bd82b5a0d8fd3d267d177a9511469817c939 /third_party/chromium/base/time/time.cc
parenta8a7c612c3db5af1ffd5f5e13587341387591f54 (diff)
parent6125590925677a6fc09007d835616ba59044885d (diff)
downloadlibweave-2c02e87003d7aa12fb2e33e99dd0208d875485bd.tar.gz
Merge remote-tracking branch \\\\'weave/master\\\\' into \\\\'weave/aosp-master\\\\' am: 7aaba04460 am: 50cf4188d8 am: 9454fc7df0
am: 6125590925 Change-Id: I5381d0e6c3ff6b735068072c2cbf205d90f74893
Diffstat (limited to 'third_party/chromium/base/time/time.cc')
-rw-r--r--third_party/chromium/base/time/time.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/third_party/chromium/base/time/time.cc b/third_party/chromium/base/time/time.cc
index 0dc892a..dd65628 100644
--- a/third_party/chromium/base/time/time.cc
+++ b/third_party/chromium/base/time/time.cc
@@ -133,11 +133,6 @@ std::ostream& operator<<(std::ostream& os, TimeDelta time_delta) {
// Time -----------------------------------------------------------------------
// static
-Time Time::Max() {
- return Time(std::numeric_limits<int64_t>::max());
-}
-
-// static
Time Time::FromTimeT(time_t tt) {
if (tt == 0)
return Time(); // Preserve 0 so we can tell it doesn't exist.
@@ -239,6 +234,14 @@ Time Time::LocalMidnight() const {
return FromLocalExploded(exploded);
}
+// static
+bool Time::ExplodedMostlyEquals(const Exploded& lhs, const Exploded& rhs) {
+ return lhs.year == rhs.year && lhs.month == rhs.month &&
+ lhs.day_of_month == rhs.day_of_month && lhs.hour == rhs.hour &&
+ lhs.minute == rhs.minute && lhs.second == rhs.second &&
+ lhs.millisecond == rhs.millisecond;
+}
+
std::ostream& operator<<(std::ostream& os, Time time) {
Time::Exploded exploded;
time.UTCExplode(&exploded);