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

Timestamp value conversion in Cloud Datastore connector is wrong #21660

Closed
damccorm opened this issue Jun 5, 2022 · 5 comments
Closed

Timestamp value conversion in Cloud Datastore connector is wrong #21660

damccorm opened this issue Jun 5, 2022 · 5 comments

Comments

@damccorm
Copy link
Contributor

damccorm commented Jun 5, 2022

Code in org.apache.beam.sdk.io.gcp.datastore.EntityToRow class:


com.google.protobuf.Timestamp time = val.getTimestampValue();
long millis = time.getSeconds() * 1000
+ time.getNanos() / 1000;
return Instant.ofEpochMilli(millis).toDateTime();

1 millisecond = 1,000,000 nanoseconds

Imported from Jira BEAM-14541. Original Jira may contain additional context.
Reported by: yixiaoshen.

@damccorm
Copy link
Contributor Author

damccorm commented Jun 5, 2022

Unable to assign user @yixiaoshen. If able, self-assign, otherwise tag @damccorm so that he can assign you. Because of GitHub's spam prevention system, your activity is required to enable assignment in this repo.

@yixiaoshen
Copy link
Contributor

@damccorm I don't have permission to assign the issue, can you help assign the issue to me? thanks!

@damccorm
Copy link
Contributor Author

damccorm commented Jun 6, 2022

Done - FWIW once #21719 is merged, you'll be able to self-assign by commenting .take-issue

@yixiaoshen
Copy link
Contributor

This is fixed by #17789, but I don't seem to have permission to .close-issue

@damccorm
Copy link
Contributor Author

This is fixed by #17789, but I don't seem to have permission to .close-issue

You just did 😃 anyone can do it by commenting .close-issue like you just did

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

No branches or pull requests

2 participants