-
Notifications
You must be signed in to change notification settings - Fork 25k
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
XPack: core/ccr/Security-cli migration to java-time #38415
Changes from 1 commit
2d3bf55
375ce19
0ba2cf6
3ebfbad
f4ad47d
82a21f9
edf9204
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,8 @@ | |
import org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder; | ||
import org.elasticsearch.xpack.core.rollup.RollupField; | ||
import org.elasticsearch.xpack.core.rollup.job.DateHistogramGroupConfig; | ||
import org.joda.time.DateTimeZone; | ||
|
||
import java.time.ZoneOffset; | ||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
@@ -220,7 +220,7 @@ private static List<AggregationBuilder> translateDateHistogram(DateHistogramAggr | |
rolledDateHisto.interval(source.interval()); | ||
} | ||
|
||
String timezone = source.timeZone() == null ? DateTimeZone.UTC.toString() : source.timeZone().toString(); | ||
String timezone = source.timeZone() == null ? ZoneOffset.UTC.toString() : source.timeZone().toString(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this get serialized over the wire somewhere? If so we may need to convert it using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is read in
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ++ |
||
filterConditions.add(new TermQueryBuilder(RollupField.formatFieldName(source, | ||
DateHistogramGroupConfig.TIME_ZONE), timezone)); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we need to do soo many convertions here. maybe using just 'ZonedDateTime.now(UTC)` ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack. can you check why we need random timezone here at all?