solr时间与本地时间相差8小时

solr在启动后,发现solr的日志时间和solr自动导入的last_index_time和本地的时间存在8个小时的时差。solr默认使用的时间是UTC时间,可以在solr的启动脚本文件中可以看到,如下所示:

修改$SOLE_INSTALL_HOME/bin/slor.in.sh,修改68行左右内容,原文件内容如下所示:

#By default the start script uses UTC; override the timezone if needed
#SOLR_TIMEZONE=“UTC”

修改为 SOLR_TIMEZONE=“UTC+8”,如下所示:

#By default the start script uses UTC; override the timezone if needed
#SOLR_TIMEZONE=“UTC+8”

发布了69 篇原创文章 · 获赞 3 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/Min_Monk/article/details/104304699