Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting the last modified timestamp returns different results #72

Open
boris-petrov opened this issue Dec 1, 2020 · 0 comments
Open

Comments

@boris-petrov
Copy link
Contributor

When using DigitalOcean Spaces, requesting the last modified time in these two ways yields two different results:

def fileSystemOptions = new FileSystemOptions()
S3FileSystemConfigBuilder.getInstance().setCredentialsProvider(fileSystemOptions,
	new AWSStaticCredentialsProvider(new BasicAWSCredentials('username', 'password')))

def file = VFS.getManager().resolveFile('s3://ams3.digitaloceanspaces.com/folder', fileSystemOptions)
println file.getChildren()[0].getContent().getLastModifiedTime()

file = VFS.getManager().resolveFile('s3://ams3.digitaloceanspaces.com/folder/file.txt', fileSystemOptions)
println file.getContent().getLastModifiedTime()

In my case I get:

1575469137773
1575469137000

That is, when getting the file directly, the timestamp is truncated. This is not a bug in vfs-s3 but rather in DigitalOcean. However, a workaround in vfs-s3 would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant