Solr - Import date time field from DB -> 2 hours d

2019-07-06 17:07发布

I'm importing a datetime column (SQLServer) in Solr, and the values is always 2 hours early in solr that in the DB, with full and delta imports.

I have configured jvm with the correct time (in the logs it's show the correct time).

I think I have to configure something in data-config.xml but I can't find any information.

Thanks in advance.

标签: import solr
1条回答
等我变得足够好
2楼-- · 2019-07-06 17:20

You need to convert your date/times into UTC format when you use the data import handler. See this thread on how to do it. AFAIK Solr always expects your dates in UTC format, no matter what the timestamp of the JVM is. Ditto for when you retrieve and display the date (it will be UTC).

查看更多
登录 后发表回答