You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by vishal patel <vi...@outlook.com> on 2020/10/01 11:21:19 UTC

Daylight savings time issue using NOW in Solr 6.1.0

Hi

I am using Solr 6.1.0. My SOLR_TIMEZONE=UTC  in solr.in.cmd.
My current Solr server machine time zone is also UTC.

My one collection has below one field in schema.
<field name="action_date" type="date" indexed="true" stored="true" docValues="true"/>
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
Suppose my current Solr server machine time is 2020-10-01 10:00:00.000. I have one document in that collection and in that document action_date is 2020-10-01T09:45:46Z.
When I search in Solr action_date:[2020-10-01T08:00:00Z TO NOW] , I cannot return that record. I check my solr log and found that time was different between Solr log time and solr server machine time.(almost 1 hours difference)

Why I cannot get the result? Why NOW is not taking the 2020-10-01T10:00:00Z?
"NOW" takes which time? Is there difference due to daylight saving time<https://en.wikipedia.org/wiki/Daylight_saving_time>? How can I configure or change timezone which consider daylight saving time?

Regards,
Vishal


Re: Daylight savings time issue using NOW in Solr 6.1.0

Posted by vishal patel <vi...@outlook.com>.
Hello,

Can anyone help me?

Regards,
Vishal

Sent from Outlook<http://aka.ms/weboutlook>
________________________________
From: vishal patel <vi...@outlook.com>
Sent: Thursday, October 1, 2020 4:51 PM
To: solr-user@lucene.apache.org <so...@lucene.apache.org>
Subject: Daylight savings time issue using NOW in Solr 6.1.0


Hi

I am using Solr 6.1.0. My SOLR_TIMEZONE=UTC  in solr.in.cmd.
My current Solr server machine time zone is also UTC.

My one collection has below one field in schema.
<field name="action_date" type="date" indexed="true" stored="true" docValues="true"/>
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
Suppose my current Solr server machine time is 2020-10-01 10:00:00.000. I have one document in that collection and in that document action_date is 2020-10-01T09:45:46Z.
When I search in Solr action_date:[2020-10-01T08:00:00Z TO NOW] , I cannot return that record. I check my solr log and found that time was different between Solr log time and solr server machine time.(almost 1 hours difference)

Why I cannot get the result? Why NOW is not taking the 2020-10-01T10:00:00Z?
"NOW" takes which time? Is there difference due to daylight saving time<https://en.wikipedia.org/wiki/Daylight_saving_time>? How can I configure or change timezone which consider daylight saving time?

Regards,
Vishal