-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
6.7 BWC layer for Java time formats in mappings does not default timezone to UTC #39067
Labels
Comments
droberts195
added
>bug
:Core/Infra/Core
Core issues without another label
v6.7.0
labels
Feb 18, 2019
Pinging @elastic/es-core-infra |
spinscale
added a commit
to spinscale/elasticsearch
that referenced
this issue
Feb 19, 2019
The parseMillis method was able to work on formats without timezones by falling back to UTC. The Java Date Formatter did not support this, as the calling code was using the `Instant.from` java time API. This switches over to an internal method which adds UTC as a timezone. Closes elastic#39067
spinscale
added a commit
to spinscale/elasticsearch
that referenced
this issue
Feb 19, 2019
The parseMillis method was able to work on formats without timezones by falling back to UTC. The Java Date Formatter did not support this, as the calling code was using the `Instant.from` java time API. This switches over to an internal method which adds UTC as a timezone. Closes elastic#39067
spinscale
added a commit
that referenced
this issue
Feb 19, 2019
The parseMillis method was able to work on formats without timezones by falling back to UTC. The Date Formatter interface did not support this, as the calling code was using the `Instant.from` java time API. This switches over to an internal method which adds UTC as a timezone. Closes #39067
spinscale
added a commit
that referenced
this issue
Feb 19, 2019
The parseMillis method was able to work on formats without timezones by falling back to UTC. The Date Formatter interface did not support this, as the calling code was using the `Instant.from` java time API. This switches over to an internal method which adds UTC as a timezone. Closes #39067
spinscale
added a commit
that referenced
this issue
Feb 19, 2019
The parseMillis method was able to work on formats without timezones by falling back to UTC. The Date Formatter interface did not support this, as the calling code was using the `Instant.from` java time API. This switches over to an internal method which adds UTC as a timezone. Closes #39067
spinscale
added a commit
that referenced
this issue
Feb 19, 2019
The parseMillis method was able to work on formats without timezones by falling back to UTC. The Java Date Formatter did not support this, as the calling code was using the `Instant.from` java time API. This switches over to an internal method which adds UTC as a timezone. Closes #39067
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is documented that timestamps parsed by mappings that do not explicitly specify a timezone are considered to be UTC. In the master branch this behaviour from the days of Joda time seems to have been preserved in the new Java time parsing. However, in the 6.7 BWC layer trying to rely on the default of UTC timestamps parsed by mappings results in an exception.
Steps to reproduce.
First, to show it works as expected in master:
git checkout master
./gradlew run
Now to show that things are different in 6.7 when Java 8 timestamp formats are used:
git checkout 6.7
./gradlew run
Unless I'm making a silly mistake I think this is another bug that needs to be fixed before 6.7 GA because otherwise the Java 8 timestamp BWC layer is not robust enough to use for other components of the stack that need to work with many different timestamp formats.
The text was updated successfully, but these errors were encountered: