Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 35928191A1 for ; Wed, 6 Apr 2016 10:43:56 +0000 (UTC) Received: (qmail 28158 invoked by uid 500); 6 Apr 2016 10:43:53 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 28034 invoked by uid 500); 6 Apr 2016 10:43:53 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 28013 invoked by uid 99); 6 Apr 2016 10:43:52 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 10:43:52 +0000 Received: from mail-oi0-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 9DCBE1A012C for ; Wed, 6 Apr 2016 10:43:52 +0000 (UTC) Received: by mail-oi0-f41.google.com with SMTP id s79so52637401oie.1 for ; Wed, 06 Apr 2016 03:43:52 -0700 (PDT) X-Gm-Message-State: AD7BkJJKBFEL9752xDcSA88boOhbUTC8O0OCg5Ub37CZJOfspIhvjjmwF1ssRVNNgHJh64yppAykBpO1aeTiTA== MIME-Version: 1.0 X-Received: by 10.202.180.137 with SMTP id d131mr1767434oif.135.1459939431754; Wed, 06 Apr 2016 03:43:51 -0700 (PDT) Received: by 10.202.219.4 with HTTP; Wed, 6 Apr 2016 03:43:51 -0700 (PDT) In-Reply-To: <5704DD7D.10509@awinta.com> References: <5704D4BB.2050709@awinta.com> <0b5f113bc780462e905f3e9413c2be32@SNSEXCPRD08.org.bas.se> <5704DD7D.10509@awinta.com> Date: Wed, 6 Apr 2016 11:43:51 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: How to use TZ parameter in a query From: Alessandro Benedetti To: "solr-user@lucene.apache.org" Content-Type: multipart/alternative; boundary=001a113cc54639339a052fcea3de --001a113cc54639339a052fcea3de Content-Type: text/plain; charset=UTF-8 At the moment, the tz parameter will be used to calculate the UTC date in the query, based on the tz supplied. In the index the dates are in UTC. To show the dates in the same timezone we query, we should implement a DocTransformer[1] . This DocTransformer will check for all ( or a subset) of date field, and render them in the input time-zone . Would be a really nice addition, I encourage people to contribute it, can be really nice completion for the tz parameter :) https://issues.apache.org/jira/browse/SOLR-8952 Will do myself in the next month, it is pretty simple change, but everyone is encouraged to contribute it :) [1] https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents On Wed, Apr 6, 2016 at 10:57 AM, Bogdan Marinescu < bogdan.marinescu@awinta.com> wrote: > I understand. Would be nice though :) > > Thanks. > > > On 04/06/2016 11:26 AM, jimi.hullegard@svensktnaringsliv.se wrote: > >> I think that this parameter is only used to interpret the dates provided >> in the query, like query filters. At least that is how I interpret the wiki >> text. Your interpretation makes more sense in general though, it would be >> nice if it was possible to modify the timezone for both the query and the >> result. >> >> /Jimi >> >> -----Original Message----- >> From: Bogdan Marinescu [mailto:bogdan.marinescu@awinta.com] >> Sent: Wednesday, April 6, 2016 11:20 AM >> To: solr-user@lucene.apache.org >> Subject: How to use TZ parameter in a query >> >> Hi, >> >> According to the wiki >> https://wiki.apache.org/solr/CoreQueryParameters#TZ I can use the TZ >> param to specify the timezone. >> I tried to make a query and put in the raw section TZ=Europe/Berlin or >> any other found in >> https://en.wikipedia.org/wiki/List_of_tz_database_time_zones but no >> luck. The date that I get back is still in UTC format. >> >> Any ideas what I'm doing wrong? >> >> Thanks >> > > -- -------------------------- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England --001a113cc54639339a052fcea3de--