From 9b4af5870ef38cae4e92b60a2f8e6efd3e93d06d Mon Sep 17 00:00:00 2001 From: johnalowry Date: Wed, 18 Mar 2020 17:01:52 -0700 Subject: [PATCH] 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. --- .../java/com/google/cloud/storage/BlobInfo.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java index 652636ac5..f21e02153 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java @@ -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; }