Skip to content

Commit

Permalink
AzureBlobVirtualFile: Fix lastModified() is returning seconds instead…
Browse files Browse the repository at this point in the history
… of milliseconds (#130)

Fix the issue reported in:
#35

Signed-off-by: Michael Trimarchi <[email protected]>
  • Loading branch information
panicking authored Dec 16, 2024
1 parent 8f9451d commit 016b514
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public long lastModified() throws IOException {
BlobClient blockBlobReference = blobContainerReference.getBlobClient(this.key);
BlobProperties properties = blockBlobReference.getProperties();
OffsetDateTime lastModified = properties.getLastModified();
return lastModified == null ? 0 : lastModified.toEpochSecond();
return lastModified == null ? 0 : lastModified.toInstant().toEpochMilli();

Check warning on line 382 in src/main/java/com/microsoft/jenkins/artifactmanager/AzureBlobVirtualFile.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 382 is not covered by tests
} catch (URISyntaxException e) {
throw new IOException(e);
} catch (BlobStorageException e) {
Expand Down

0 comments on commit 016b514

Please sign in to comment.