Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在日志中,时间戳比我的时区早几个小时,即 PST。如何将其更改为正确的时区,或以任何可用的方式使其获取系统时间?我在 Windows 上使用 Solr 5.3 谢谢
它是资源文件夹下的 log4j 配置。更改: org.apache.log4j.PatternLayout 到 org.apache.log4j.EnhancedPatternLayout 现在可以将时区从 %d 更改为 %d{ISO8601}{GMT-7}