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

feat(static): switch partial datetime parser to use UTC by default #3473

Merged
merged 1 commit into from Oct 3, 2019

Conversation

big-andy-coates
Copy link
Contributor

Description

With this change the ROWTIME rewriter and static queries will use UTC by default for datetime strings, if not explicit timezone is provided.

Testing done

USual

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

With this change the ROWTIME rewriter and static queries will use UTC by default for datetime strings, if not explicit timezone is provided.
@big-andy-coates big-andy-coates requested a review from a team as a code owner October 3, 2019 20:47
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -43,44 +43,44 @@ public void init() {
@Test
public void shouldParseYear() {
// When:
assertThat(parser.parse("2017"), is(fullParse("2017-01-01T00:00:00.000")));
assertThat(parser.parse("2017"), is(fullParse("2017-01-01T00:00:00.000+0000")));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't need all of these +0000s after this change, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we do. The 'fullParse' is expecting a tz - this makes the tests very explicit as to what timezone is expected.

@agavra agavra requested a review from a team October 3, 2019 21:37
@big-andy-coates big-andy-coates merged commit 81557e3 into confluentinc:master Oct 3, 2019
@big-andy-coates big-andy-coates deleted the utc_z branch June 30, 2020 16:13
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

Successfully merging this pull request may close these issues.

None yet

2 participants