0

I need to process Google Play customer reviews as described in https://developers.google.com/android-publisher/api-ref/reviews and https://developers.google.com/android-publisher/reply-to-reviews.
The documentation shows

"lastModified": {
          "seconds": long,
          "nanos": integer
        },

Example

"lastModified": {
          "seconds": "1452114723",
          "nanos": 913000000
        },
  • comments[].developerComment.lastModified
    • nested object
    • The last time * at which this comment was updated.
  • comments[].developerComment.lastModified.nanos
    • integer
  • comments[].developerComment.lastModified.seconds
    • long

Can anyone give me a hint how to convert seconds/nanos to normal date/time?

tripleee
  • 175,061
  • 34
  • 275
  • 318
Michael Freidgeim
  • 26,542
  • 16
  • 152
  • 170

2 Answers2

0

I was able to figure out that seconds in Google documentation means Unix epoch time (Epoch beginning 1/1/1970).

To convert to time you can use FromUnixTime extension from
How do you convert epoch time in C#?.

I didn't expect that Google has such bad documentation and do not care about feedback( Where to submit Google play developer api feedback?)

Community
  • 1
  • 1
Michael Freidgeim
  • 26,542
  • 16
  • 152
  • 170
0

For java/joda time the time is in milli seconds hence will require to be multiplied by 1000.

DateTime seconds = new DateTime(1452114723 * 1000L);
binshi
  • 1,248
  • 2
  • 17
  • 33