-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.triage meI really want to be triaged.I really want to be triaged.
Description
Java measures time in milliseconds from the epoch not seconds and using this as a base would be simpler. The example:
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, 1);
long expiration = cal.getTimeInMillis() / 1000;
storage.signUrl(blobInfo, expiration));would become:
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, 1);
storage.signUrl(blobInfo, cal.getTime()));However, given this is actually just performing an interval calculation we could also support:
storage.signUrl(blobInfo, 1, TimeUnit.DAYS);Ideally we would also support the time classes added in Java 8:
storage.signUrl(blobInfo, Instant.now().plus(24, ChronoUnit.HOURS));
storage.signUrl(blobInfo, Duration.ofDays(1));Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.triage meI really want to be triaged.I really want to be triaged.