因為公司的數據有使用ArticleStartDate, 但這個Site Column在搜索功能上會有-8小時的問題 (我的場在GMT+8 但數據和搜索式都是GMT0) 這問題糾結了很久, 微軟又沒有官方渠道去匯報, 只能貼到MSDN論壇碰碰運氣…
This issue can be reproduced easily on any SP2013 farm (on-premise) and I heard Sharepoint online do not have this problem.
Issue: Site column “Article Date" with fieldname “ArticleStartDate" is crawled as GMT 0 regardless what timezone your web application, site setting, user setting and OS are set. Also when you submit a search you need to use GMT 0 otherwise you will get wrong result. I believe it is bug because other datetime columns like “Modified" have handled timezone issue very well.
To reproduce: On a SP2013 farm (on-premise), check your timezone settings (in my environment it is GMT+8). Then create a site collection and enable its Publishing Infrastructure feature. Then you will see some site columns are setup including “Article Date" (field name “ArticleStartDate"). Now create a custom content type and add some columns including “Article Date" to it. Create some sample items using the custom content type and remember fill in the value for “Article Date". By default it should allow you pick a “Date" only. After save the change you should see “Article Date" is saved like “2014-06-18 00:00:00″ if check with powershell.
After create some sample items start a full crawl. You will see find two crawled property “ows_q_DATE_ArticleStartDate" and “ows_ArticleStartDate" appear in Search Service Application -> Search Schema. There are some existing managed properties mapping to those crawled properties like “ArticleStartDateOWSDATE" (which is TEXT datatype).
Here you can create some new managed property or use existing. Apply search using those properties to test. In my lab, I created “NewsArticleDate" as managed property and mapping to ows_ArticleStartDate. Then I create a blank page and add a “Search result" and “refinement panel" webpart and start some search. In the refinement panel added in the managed properties setup in previous steps. In the querystring I typed in something like /search.aspx?k=newsarticledate=YYYY/MM/dd
It is what I see:
1. As you can see in the refinement panel, because I am at GMT+8 and crawled index at GMT 0, the sample data “2014-06-18 00:00:00″ will become “2014-06-17 16:00:00″.
2. Hence, in order to search out “2014-06-18 00:00:00″ item I have to input “2014-06-17″ in search query! (in SP2013 the time part are ignored)
3. By using the powershell provided by Ivan Josipovic (http://gallery.technet.microsoft.com/office/Get-Crawled-Property-names-9e8fc5e0), I can see the items ows_ArticleStartDate is “2014-06-18 00:00:00″.
I hope it is actually not a bug. Please let me know if my setting is wrong. Thank you!