2012-06-20 29 views
0

爲什麼當我嘗試將日期時間000-00-00T00:00:00Z(數據源爲Mysql)存儲到solr時,它被保存爲0002-11-30T00:00:00Z?Solr的日期時間字段存儲錯誤

可以Solr存儲日期時間與格式0000-00-00TT00:00:00Z?

<response> 
<lst name="responseHeader"> 
    <int name="status">0</int> 
    <int name="QTime">2</int> 
</lst> 
<result name="response" numFound="334" start="0"> 
<doc> 
    <short name="contacts">0</short> 
    <str name="country">PT</str> 
    <str name="email"/> 
    <date name="first_visit_datetime">0002-11-30T00:00:00Z</date> 
    <long name="id">101</long> 
    <date name="last_visit_datetime">0002-11-30T00:00:00Z</date> 
    <str name="name"/> 
    <str name="organization"/> 
    <str name="phone"/> 
    <str name="region">14</str> 
    <short name="visits">0</short> 
</doc> 

回答

2

不是,它來自ISO 8601,我認爲它總是一樣的。

+0

好的迴應是[這裏](http://www.w3.org/TR/xmlschema-2/#dateTime)。感謝@Vincenzo Maggio的線索:) –

+0

非常感謝你!不用謝! –