I don't figure out how to import the correct datetime from mysql to solr via the DataImportHandler. After the import the datetime values get substracted 2 hours
mysql "created_at 2013-04-05 15:04:21" gets in solr to "created_at":"2013-04-05T13:04:21Z"
mysql @@global.time_zone, @@session.time_zone are both system and display the correct CET time.
Here my data-config.xml
<dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/test"
user="+++" password="++++/> <document>
<entity name="id"
query="SELECT table.created_at, ... from table"
<field column="created_at" name="created_at"/>
I tried to use the CONVERT_TZ command. In mysql it worked out. But with solr I have no success, the created_at value is the not indexed at all.
<entity name="id"
query="SELECT query="SELECT CONVERT_TZ(table.created_at,'+00:00','+01:00'), ... from table"
<field column="created_at" name="created_at"/>