Rename timeMs into time

Use number instead of string to store time.
We don't use unit suffixes in other privet parts. Also suffix should not
be necessary as milliseconds is default Javascript time format.

BUG=26160070

Change-Id: I779f3fd3e232d47724cfdb67072a980c4d966a8b
Reviewed-on: https://weave-review.googlesource.com/1925
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/src/privet/privet_handler.cc b/src/privet/privet_handler.cc
index d172312..df0c74d 100644
--- a/src/privet/privet_handler.cc
+++ b/src/privet/privet_handler.cc
@@ -70,7 +70,7 @@
 const char kInfoWifiHostedSsidKey[] = "hostedSsid";
 
 const char kInfoUptimeKey[] = "uptime";
-const char kInfoTimeMsKey[] = "timeMs";
+const char kInfoTimeKey[] = "time";
 
 const char kPairingKey[] = "pairing";
 const char kPairingSessionIdKey[] = "sessionId";
@@ -548,7 +548,7 @@
   output.Set(kGcdKey, CreateGcdSection(*cloud_).release());
 
   output.SetInteger(kInfoUptimeKey, device_->GetUptime().InSeconds());
-  output.SetString(kInfoTimeMsKey, std::to_string(clock_->Now().ToJavaTime()));
+  output.SetDouble(kInfoTimeKey, clock_->Now().ToJsTime());
 
   callback.Run(http::kOk, output);
 }
diff --git a/src/privet/privet_handler_unittest.cc b/src/privet/privet_handler_unittest.cc
index da64ab9..3f8f975 100644
--- a/src/privet/privet_handler_unittest.cc
+++ b/src/privet/privet_handler_unittest.cc
@@ -94,7 +94,7 @@
  protected:
   void SetUp() override {
     EXPECT_CALL(clock_, Now())
-        .WillRepeatedly(Return(base::Time::FromTimeT(1410000000)));
+        .WillRepeatedly(Return(base::Time::FromTimeT(1410000001)));
 
     auth_header_ = "Privet anonymous";
     handler_.reset(new PrivetHandler(&cloud_, &device_, &security_, &wifi_,
@@ -248,7 +248,7 @@
       'status': 'disabled'
     },
     'uptime': 3600,
-    'timeMs': '1410000000000'
+    'time': 1410000001000.0
   })";
   EXPECT_JSON_EQ(kExpected, HandleRequest("/privet/info", "{}"));
 }
@@ -310,7 +310,7 @@
       'status': 'online'
     },
     'uptime': 3600,
-    'timeMs': '1410000000000'
+    'time': 1410000001000.0
   })";
   EXPECT_JSON_EQ(kExpected, HandleRequest("/privet/info", "{}"));
 }