Skip to content

Commit

Permalink
docs: clarify documentation on date formats (#196)
Browse files Browse the repository at this point in the history
9b4af58
commit 9b4af58
Author: johnalowry <jlowry@google.com>
Date:   Wed Mar 18 17:01:52 2020 -0700

    docs: clarify documentation on date formats (#196)

    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
yoshi-automation committed Mar 30, 2020
1 parent c2cea27 commit dd769c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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
2 changes: 1 addition & 1 deletion synth.metadata
@@ -1,5 +1,5 @@
{
"updateTime": "2020-03-30T22:54:25.656492Z",
"updateTime": "2020-03-30T22:54:26.936389Z",
"sources": [
{
"git": {
Expand Down

0 comments on commit dd769c4

Please sign in to comment.