Solr不以UTC格式节省时间 [英] Solr not saving time in UTC format
本文介绍了Solr不以UTC格式节省时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我定义了一个类型为 Solr.DateField 的字段,我读到 SOLR 总是以 GMT 格式保存它.但是我看到 SOLR 只占用我的数据库中定义的时间,并在没有转换的情况下写入它.
If I had defined a field of type Solr.DateField, I read SOLR always saves it in GMT. But I see that SOLR just takes the time that is in defined in my DB and writes it without conversion.
有没有相关的配置参数?
Is there any configuration parameter for it?
推荐答案
据我所知,Solr 存储日期完全,不考虑任何时区信息.由您决定从/转换为 UTC.这是确认这一点的论坛帖子.
As far as I know Solr stores dates exactly as you feed it, disregarding any timezone information. It's up to you to convert from/to UTC. Here's a forum thread that confirms this.
例如,这里有一些 PHP 的转换例程.
这篇关于Solr不以UTC格式节省时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文