I don't believe this is a Solr issue at all. I suspect your MySql query is
doing the
timezone change. Solr doesn't apply any processing to the date, it doesn't
need to because times are all Zulu.

There's a little known debug console for DIH, see:
http://wiki.apache.org/solr/DataImportHandler#interactive
<http://wiki.apache.org/solr/DataImportHandler#interactive>that might help a
lot. I think what you need to do is apply a transformation in your
SQL statement to get times in UTC, somthing like CONVERT_TZ or some such,
see:
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_convert-tz

Best
Erick

On Thu, Nov 25, 2010 at 5:27 AM, Shanmugavel SRD
<srdshanmuga...@gmail.com>wrote:

>
> I am using SOLR 1.4.1. My SOLR runs in a server which is in EST zone.
> I am trying to index a date field which is in MySQL as
> '2007-08-08T05:36:50Z' but while indexing it becomes '2007-08-08T09:36:50Z'
> where 4 hours got increased. But I want the date as is while indexing,
> means, after indexing I want the value as '2007-08-08T05:36:50Z' in
> 'modified_d' field.
>
> Can anyone help me on this?
>
> <field column="post_modified" name="modified_d"
> dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss'Z'" />
>
> I searched in this forum and there are discussions on this same problem but
> on SOLR 1.3, that's why I am posting this query again.
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/SOLR-1-4-1-Indexing-DateField-time-zone-problem-tp1966118p1966118.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to