Skip to content

Commit

Permalink
docs: clarify documentation on date formats (#196)
Browse files Browse the repository at this point in the history
System.out.printf("Blob updatetime: %s", blob.getUpdateTime());

The output was

Blob updatetime: 1582157090238

I verified that this was ms after epoch:

$ date -d @1582157090
Wed 19 Feb 2020 04:04:50 PM PST

I also traced the code to this function:

https://github.com/googleapis/google-http-java-client/blob/master/google-http-client/src/main/java/com/google/api/client/util/DateTime.java#L53

I assumed that create and delete times used the same format.
  • Loading branch information
johnalowry committed Mar 19, 2020
1 parent 6c7a498 commit 9b4af58
Showing 1 changed file with 12 additions and 3 deletions.
Expand Up @@ -795,17 +795,26 @@ public Long getMetageneration() {
return metageneration;
}

/** Returns the deletion time of the blob. */
/**
* Returns the deletion time of the blob expressed as the number of milliseconds since the Unix
* epoch.
*/
public Long getDeleteTime() {
return deleteTime;
}

/** Returns the last modification time of the blob's metadata. */
/**
* Returns the last modification time of the blob's metadata expressed as the number of
* milliseconds since the Unix epoch.
*/
public Long getUpdateTime() {
return updateTime;
}

/** Returns the creation time of the blob. */
/**
* Returns the creation time of the blob expressed as the number of milliseconds since the Unix
* epoch.
*/
public Long getCreateTime() {
return createTime;
}
Expand Down

0 comments on commit 9b4af58

Please sign in to comment.