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

Keep time zone information when creating widget #2452

Merged
merged 1 commit into from Jul 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -17,7 +17,6 @@
package org.graylog2.timeranges;

import com.google.common.base.Strings;
import org.graylog2.plugin.Tools;
import org.graylog2.plugin.indexer.searches.timeranges.AbsoluteRange;
import org.graylog2.plugin.indexer.searches.timeranges.InvalidRangeParametersException;
import org.graylog2.plugin.indexer.searches.timeranges.KeywordRange;
Expand All @@ -40,8 +39,8 @@ public TimeRange create(final Map<String, Object> timerangeConfig) throws Invali
case "keyword":
return KeywordRange.create((String) timerangeConfig.get("keyword"));
case "absolute":
final String from = new DateTime(timerangeConfig.get("from"), DateTimeZone.UTC).toString(Tools.ES_DATE_FORMAT);
final String to = new DateTime(timerangeConfig.get("to"), DateTimeZone.UTC).toString(Tools.ES_DATE_FORMAT);
final String from = new DateTime(timerangeConfig.get("from"), DateTimeZone.UTC).toString();
final String to = new DateTime(timerangeConfig.get("to"), DateTimeZone.UTC).toString();

return AbsoluteRange.create(from, to);
default:
Expand Down