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

Meta.getDataAge() returns an incorrectly parsed java.util.Date object #137

Open
chadshowalter opened this issue Nov 9, 2023 · 0 comments

Comments

@chadshowalter
Copy link

Consider this scenario.

  • the sc-data-age header contains the String "2023-11-09T15:52:20.203Z"
  • the JVM timezone is "America/New_York"
  • Meta.getDataAge() returns a java.util.Date object that is equivalent to the instant "2023-11-09 20:52:20.203Z"

So it's incorrect.

I note that if the JVM timezone is set to UTC, the parsing is correct. However, it's not reasonable to assume the user's JVM has to be set to UTC.

This problem could be addressed in different ways; I think using java.time classes would be best.

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

No branches or pull requests

1 participant