Skip to content

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

Description

@chadshowalter

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions